One use case that comes to mind is form validation, for example:
GraphQL Query
mutation {
createUser(email: "[email protected]", password: "Passw0rd") {
state: {
isValid,
errors* <-- here
},
user {
id,
email,
emailVerified
}
}
}
GraphQL Response
{
data: {
state: {
isValid: false,
errors: {
'': [
'Failed to create a new user account.'
],
email: [
'User with this email address ([email protected]) already exists.'
]
},
},
user: null
}
}
Ref #117, graphql/graphql-js#44
One use case that comes to mind is form validation, for example:
GraphQL Query
GraphQL Response
Ref #117, graphql/graphql-js#44