Adding a variable to a GraphQL query seems not working

I'm trying to create a graphql query where one of the filters is a variable. The original query is like following :

query {
orders(filter:{status:$variable})
{
id
client {name}
buyingPriceHt
sellingPriceHt
orderItem{
productName
quantity
weight
imgUrl
sellingPriceHt
buyingPriceHt
}
}
}

But the $variable doesn't appear in the variable bloc in the UI and the variable UI remains grayed.

@mtopolov

Hey there :wave: Victoria shared helpful docs when answering a similar question, linking her response here :slightly_smiling_face:

HI - I seem to be coming across the same problem. I enter the $var into the graphQL query and the UI stays grey and I am unable to define it.

Hi @GMoyle

Thanks for reaching out! Line 2 needs your variable & the type, as shown in this example (type is ID!):

Also, for line 4, I don't believe you need the () after items