You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running a very simple query with a variable, but when execute the schema I get an error that the variable isn't declared, but I pass it in a Hash.
[1]pry(#<Cruise::App>)> query_variables=>{"channel_id"=>"1"}[2]pry(#<Cruise::App>)> query_string=>"{\n channel(id:$channel_id) {\n id\n }\n}"[3]pry(#<Cruise::App>)> Schema.execute(query_string, variables: query_variables)=>{"errors"=>[{"message"=>"Variable $channel_id is used by but not declared","locations"=>[{"line"=>2,"column"=>13}]}]}[4]pry(#<Cruise::App>)> GraphQL::VERSION=>"0.17.2"
For completeness sake here's my action code. The query comes from a graphiql instance I've set up myself (possible source of errors, but the values arriving in ruby do look ok).
Hi,
I'm running a very simple query with a variable, but when execute the schema I get an error that the variable isn't declared, but I pass it in a Hash.
For completeness sake here's my action code. The query comes from a graphiql instance I've set up myself (possible source of errors, but the values arriving in ruby do look ok).
Am I doing anything obviously wrong here which I'm to blind to see? What's a good way to further debug this?
Thanks
The text was updated successfully, but these errors were encountered: