Title
l

Lucas

12/20/2018, 4:33 AM
Guys what im doing wrong?? I just get the code from the tutorial I am trying to create query to get all the users, so simple. but when I try my query in the playground it returns:
"message": "Cannot return null for non-nullable field Query.users.",
Query:
query {
	users{
   id 
  }
}
Code: https://github.com/RecoX/test-graph/blob/master/src/schema.graphql
b

brentsoles

12/20/2018, 11:46 PM
I do not know if you have solved this yet, but that messages is given when you are returning a null value from the resolver. Either there are no users present on the backend, or the resolver is not returning the correct type! Hope this helps! 😒imple_smile:
You also are not exporting the resolver from
resolvers/Query.js
, so the query is defined in the typedefs, but the request is going nowhere.