theom
10/31/2018, 10:10 AM{
"data": null,
"errors": [
{
"message": "Cannot return null for non-nullable field User.permissions.",
"locations": [
{
"line": 14,
"column": 5
}
],
"path": [
"signin",
"permissions"
]
}
]
}
when attempting to run the following mutation. What am I overlooking:
mutation SIGNIN_MUTATION($email: String!, $password: String!, $pathname: String!) {
signin(email: $email, password: $password, pathname: $pathname) {
id
name
email
permissions
}
}
based on the following schema and datamodel
schema
type Mutation {
signin(email: String!, password: String!, pathname: String!): User!
}
datamodel
type User {
id: ID! @unique
name: String!
email: String! @unique
password: String!
resetToken: String
resetTokenExpiry: String
permissions: [Permission]
cart: [CartItem!]!
}Martin
10/31/2018, 1:34 PMtype Mutation {
signin(email: String!, password: String!, pathname: String!): [User!]!
}theom
10/31/2018, 7:04 PM