From 00a516f26ce3951ed9a6dbf8a25ca23239e9c39e Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Sat, 4 Jan 2020 16:10:57 +0100 Subject: [PATCH] feat: export ApolloError --- packages/@nodepack/plugin-apollo/src/utils.js | 2 ++ packages/@nodepack/plugin-apollo/types/index.d.ts | 3 +++ 2 files changed, 5 insertions(+) diff --git a/packages/@nodepack/plugin-apollo/src/utils.js b/packages/@nodepack/plugin-apollo/src/utils.js index 95fa10a..adc70df 100644 --- a/packages/@nodepack/plugin-apollo/src/utils.js +++ b/packages/@nodepack/plugin-apollo/src/utils.js @@ -82,3 +82,5 @@ exports.getCustomField = function (fields, id) { return null } } + +exports.ApolloError = require('apollo-server-express').ApolloError diff --git a/packages/@nodepack/plugin-apollo/types/index.d.ts b/packages/@nodepack/plugin-apollo/types/index.d.ts index 60e3e0f..fa3167d 100644 --- a/packages/@nodepack/plugin-apollo/types/index.d.ts +++ b/packages/@nodepack/plugin-apollo/types/index.d.ts @@ -1,6 +1,7 @@ import { DocumentNode, GraphQLResolveInfo } from 'graphql' import { Config } from 'apollo-server-express' import ApolloContext from './context' + export { default as ApolloContext, Schema } from './context' export interface ApolloConfig { @@ -36,3 +37,5 @@ export function getCustomField ( fields: CustomField[], id: string ): CustomField + +export { ApolloError } from 'apollo-server-express'