graphql-format-error-context-extension
Usage
- This package needs
graphql-extensions
to be installed:npm i graphql-extensions --save
- Install the npm package as a dependency
npm i graphql-format-error-context-extension --save
- Add this extension and use
context
on formatError like this:
const ApolloServer = ;const FormatErrorWithContextExtension = ; const formatError = { // can use `err` and `context` return err;}; const server = typeDefs resolvers extensions: formatError ctx;