Skip to content

Did PR #4229 go too far? #4259

@rstata

Description

@rstata

PR #4229 unifies the behavior of all built-in directives, where in the past skip and include was treated differently from other built ins. In the process, the GraphQLSchema.Builder.clearDirectives method was removed, because this was one of the places where different built-ins were being treated differently.

However, we have a use-case where we use GraphQLSchema.transform to transform all of the non-built-in directives in a schema. This works by taking all the existing non-graphql-builtin directives from the source schema, then calling clearDirectives on the builder for the new schema, then adding transformations of the original directives into the new schema. So a semantics of clearDirectives which is "clear all non-graphql-builtin directives" would be helpful. So perhaps the change in #4229 should've been: "clearDirectives clears non-graphql built-in directives, but treats all graphql built-ins uniformly (contra the old behavior)" -- rather than getting rid of it altogether.

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