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


#1

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 https://github.com/iamrommel/meteor-apollo-sample


#2

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


#3

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


#4

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


#5

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?


#6

The posted query seems odd


#7

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


#8

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.