Following is the schema
type Payload {
name: String!
address: String!
phone: String
}
type Mutation {
login(username: String!, password: String!): Payload!
}
Following is the resolver for Payload
Payload: {
user: {
resolve: async (parent, args, context, info) => {
// Some logic here
throw err;
}
}
}
When I throw error from child resolver (here payload resolver) graphql still return all payload data return from Parent resolver and for only user field it return error. Can we change this behaviour to return only error which child resolver throws ?