I am trying to do a custom error format on graphql without using express-graphql. What I tried to do is:
import { graphql } from 'graphql';
graphql.formatError = err => ...;
Sadly, it doesn't work. It would be great if you guys could help me out.