Skip to content

Handle deprecation of inputs #267

@fotoetienne

Description

@fotoetienne

Deprecation of input values has now been merged into the GraphQL spec. This includes a modification to the introspection query.

Without includeDeprecated = true on inputFields in the introspection query, an error occurs on any input objects that have all fields deprecated:
Error: Invalid schema from introspection: Input Object type <typename> must define one or more fields.

GraphiQL now has a flag that determines whether the introspection query should include includeDeprecated = true on inputFields, since only compatible graphs will know about this argument. Sandbox/explorer could do something similar or somehow autodetect whether the graph supports deprecation of input fields.

You just need to set the inputValueDeprecation arg in the graphql-js getIntrospectionQuery function.

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