Juan Varela
06/09/2021, 5:31 PMTo 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:
export default mutationField('signup', {
type: AuthPayload, // Here should be OR ERROR
async resolve(_parent, args, context: Context) {
Thank you very much in advance!