diff --git a/packages/apollo-engine-reporting/src/extension.ts b/packages/apollo-engine-reporting/src/extension.ts index 86ad8247..92899c10 100644 --- a/packages/apollo-engine-reporting/src/extension.ts +++ b/packages/apollo-engine-reporting/src/extension.ts @@ -125,7 +125,7 @@ export class EngineReportingExtension for (const [key, value] of o.request.headers) { if ( this.options.privateHeaders && - typeof this.options.privateHeaders === 'object' && + Array.isArray(this.options.privateHeaders) && // We assume that most users only have a few private headers, or will // just set privateHeaders to true; we can change this linear-time // operation if it causes real performance issues. @@ -164,7 +164,7 @@ export class EngineReportingExtension Object.keys(o.variables).forEach(name => { if ( this.options.privateVariables && - typeof this.options.privateVariables === 'object' && + Array.isArray(this.options.privateVariables) && // We assume that most users will have only a few private variables, // or will just set privateVariables to true; we can change this // linear-time operation if it causes real performance issues.