Skip to content

v2.18 regression in behavior of APOLLO_SCHEMA_REPORTING=true + engine: {reportSchema: false} #4778

@glasser

Description

@glasser

Before the big refactor in v2.18, setting engine: {reportSchema: false} would override the env var APOLLO_SCHEMA_REPORTING=true.

In v2.18 the engine parameter is just for backwards compatibility. By accident, this combination now leads to schema reporting; there is no way in code to override APOLLO_SCHEMA_REPORTING=true.

(Note: both of these statements are based on code observation, not running code.)

Two things that perhaps can be done here:

  • Introduce a ApolloServerPluginSchemaReportingDisabled, like the other *Disabled plugins, that overrides the env var.
  • Change the legacy engine option handling so that false overrides the env var.

Workaround: Don't set APOLLO_SCHEMA_REPORTING in environments where you don't want schema reporting; either only set it in appropriate contexts or only enable schema reporting via plugins: [ApolloServerPluginSchemaReporting()].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions