prisma-labs / graphql-framework-experiment

Code-First Type-Safe GraphQL Framework
https://nexusjs.org
MIT License
674 stars 66 forks source link

@nexus/schema return wrong error object shape #1392

Open dohaicuong opened 4 years ago

dohaicuong commented 4 years ago

Hi,

The problem is when I'm implement a resolver that throw an error, for example image

When I'm using nexus framework or any other engine, the response have this shape

{
  data: { login: null },
  errors: [{}]
}

image

But when I using @nexus/schema, I got

{
  data: null,
  errors: [{}]
}

image