Sending custom error data in the graphql response — gqlgen
Customising graphql error types to send custom error data back to the client using gqlgen.