Skip to content

GraphQL Playground configuration breaks BC #7792

@bkosun

Description

@bkosun

API Platform version(s) affected: ≥ 4.1.18

Description
The GraphQL Playground IDE was deprecated in version 3.1.0 (#5309) and removed in 4.1.18 (#7204).

Versions 3.1.0 - 4.1.17 emit the following warning:

Since api-platform/core 3.1: GraphQL Playground is deprecated and will be removed in API Platform 4.0. Only GraphiQL will be available in the future. Set api_platform.graphql.graphql_playground to false in the configuration to remove this deprecation.

This warning can be suppressed as follows:

graphql:
   graphql_playground: false

or

graphql_playground:
    enabled: false

However, in version 4.1.18 this configuration produces an error:

Unrecognized option "graphql_playground" under "api_platform.graphql". Available options are "collection", "default_ide", "enabled", "graphiql", "introspection", "max_query_complexity", "max_query_depth", "nesting_separator".

To ensure backward compatibility, a patch was applied (#7274), however, when trying to update version ≤ 4.1.18 to 4.1.19 - 4.2.17, an error will occur:

graphql:
    graphql_playground: false

Invalid type for path "api_platform.graphql.graphql_playground". Expected "array", but got "bool"

or

graphql_playground:
    enabled: false

Unrecognized option "enabled" under "api_platform.graphql.graphql_playground". Available options are "".

How to reproduce
Set the graphql_playground option in versions ≤ 4.1.18 and update the package to 4.1.19 - 4.2.17.

Possible Solution
It seems the graphql_playground option should be allowed to be used even if it has no effect, to ensure backward compatibility and safe package updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions