Hi all! In <graphql-shield> it states: &gt; To r...
# orm-help
j
Hi all! In graphql-shield it states:
To return custom error messages to your client, you can return error instead of throwing it.
The problem is that when using nexus.js with typescript, the resolver doesn’t allow to return an error. Other than returning:
return new Error("Custom error") as any
What can I do if I have something like this:
Copy code
export default mutationField('signup', {
  type: AuthPayload, // Here should be OR ERROR
  async resolve(_parent, args, context: Context) {
Thank you very much in advance!