diff --git a/packages/apollo-server-core/src/requestPipeline.ts b/packages/apollo-server-core/src/requestPipeline.ts index ae839785d3a..3de6f066138 100644 --- a/packages/apollo-server-core/src/requestPipeline.ts +++ b/packages/apollo-server-core/src/requestPipeline.ts @@ -7,8 +7,16 @@ import { ExecutionArgs, GraphQLError, GraphQLFormattedError, + validate as graphqlValidate, + parse as graphqlParse, + execute as graphqlExecute, + GraphQLField, + ResponsePath, + FieldNode, + getNamedType, + GraphQLObjectType, + defaultFieldResolver, } from 'graphql'; -import * as graphql from 'graphql'; import { GraphQLExtension, GraphQLExtensionStack, @@ -424,7 +432,7 @@ export async function processGraphQLRequest( }); try { - return graphql.parse(query, parseOptions); + return graphqlParse(query, parseOptions); } finally { parsingDidEnd(); } @@ -439,7 +447,7 @@ export async function processGraphQLRequest( const validationDidEnd = extensionStack.validationDidStart(); try { - return graphql.validate(config.schema, document, rules); + return graphqlValidate(config.schema, document, rules); } finally { validationDidEnd(); } @@ -474,7 +482,7 @@ export async function processGraphQLRequest( // (eg apollo-engine-reporting) assumes that. return await config.executor(requestContext); } else { - return await graphql.execute(executionArgs); + return await graphqlExecute(executionArgs); } } finally { executionDidEnd();