GraphQL error: Cannot query field "name" on type "Query

I’m doing a simple hello world application that uses ApolloStack and react-meteor but it seems not working fine. Using the localhost:3000/graphiql seem to work fine but when i’m doing it on the meteor-react that error came which i’m not sure what im doing wrong.

Here are the screenshot of what i’m doing

and the github sample application URL GitHub - iamrommel/meteor-apollo-sample

You should copy the query exactly from GraphiQL. You’re reformatting it with the query keyword which is a different way of writing queries.

Thank you very much. sorry for the noob question. :slight_smile:

Now i did what you said and it works great. But i have another query which has parameters and copy the value from grapqil (which is working) but now i got an error again. please help @sashko

hmm, looks like your GraphQL server returned “400 bad request”. Can you go into the chrome network debugger and see what the request sent was?

The posted query seems odd

After digging into my problem, the issue was the query that was located on other component. And that query was outdated because I change the graphql schema… If only the debugger pinpoint on which component the error came from, i think i can easily start checking that component first

1 Like

That’s a great idea - mind filing an issue in react-apollo about it? I think it should be easy to add something about which component sent the query.