diff --git a/packages/apollo-engine-reporting/src/treeBuilder.ts b/packages/apollo-engine-reporting/src/treeBuilder.ts index 01e499d7834..c6c40742c2f 100644 --- a/packages/apollo-engine-reporting/src/treeBuilder.ts +++ b/packages/apollo-engine-reporting/src/treeBuilder.ts @@ -5,7 +5,11 @@ import { responsePathAsArray, } from 'graphql'; import { Trace, google } from 'apollo-engine-reporting-protobuf'; -import { PersistedQueryNotFoundError } from 'apollo-server-errors'; +import { + PersistedQueryNotFoundError, + PersistedQueryNotSupportedError, +} from 'apollo-server-errors'; +import { InvalidGraphQLRequestError } from "apollo-server-types"; function internalError(message: string) { return new Error(`[internal apollo-server error] ${message}`); @@ -78,7 +82,9 @@ export class EngineReportingTreeBuilder { public didEncounterErrors(errors: GraphQLError[]) { errors.forEach(err => { - if (err instanceof PersistedQueryNotFoundError) { + if (err instanceof PersistedQueryNotFoundError || + err instanceof PersistedQueryNotSupportedError || + err instanceof InvalidGraphQLRequestError) { return; }