prisma-labs / graphql-prisma-typescript

🏡 GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga
MIT License
749 stars 108 forks source link

"errors": [ { "message": "Cannot return null for non-nullable type }] #421

Closed Anujraval24 closed 4 years ago

Anujraval24 commented 5 years ago
"errors": [
    {
      "message": "Cannot return null for non-nullable type (line 3, column 5):\n    id\n    ^",
}

in graphcool logs the id shows undefined i am doing mutation mutation{

 signupUser(email:"__EMAIL__",password:"__PASSWORD__"){
    id
    token
  }
}

signup.graphql

type SignupUserPayload {
  id: ID!
  token: String!
}

extend type Mutation {
  signupUser(email: String!, password: String!): SignupUserPayload
}

any solution on this @marktani @schickling