Reputation: 95
I am trying to query by passing the variable id
in the query variable window. This results in an error "Variable \"$id\" of required type \"ID!\" was not provided."
When I run a different query without passing a variable in the query variable section it successfully returns results.
Why does one produce an error, but not the other?
Upvotes: 9
Views: 11985
Reputation: 14918
in my case i mistakenly provided query in HTTP HEADERS
instead of QUERY VARIABLE
,
provide values inside QUERY VARIABLE
it solves your issues
Upvotes: 0
Reputation: 196
You have to select the QUERY VARIABLES tab, and put the variable value there. You can check that in the attached image.
Upvotes: 12
Reputation: 158977
In the first screenshot you've typed JSON into the "HTTP Headers" tab, not the "Query Variables" tab. Clear out this section and type the JSON variables object into the correct tab.
Upvotes: 7