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
Victoria shared helpful docs when answering a similar question, linking her response here ![:slightly_smiling_face: :slightly_smiling_face:](http://community.retool.com/images/emoji/apple/slightly_smiling_face.png?v=12)
GMoyle
3
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.
Tess
4
Hi @GMoyle
Thanks for reaching out! Line 2 needs your variable & the type, as shown in this example (type is ID!):
![](https://downloads.intercomcdn.com/i/o/872575352/2681dee6a9567992429cb4d4/image.png)
Also, for line 4, I don't believe you need the () after items