Skip to content

Scalars lose their directives, including @specifiedBy #864

Open

Description

@oryan-block

Scalars are built in SchemaClassScanner from the GraphQLScalarType passed to .scalars(...), but only its name, description and coercing are copied. Directives from the SDL are never applied, on the scalar or on its extensions:

scalar Date @specifiedBy(url: "https://example.com/date")

prints as scalar Date. The provided scalar's own specifiedByUrl and directives aren't copied either.

Probably easiest to build scalars in SchemaParser like the other types, so they go through directivesOf and SchemaDirectiveWiring too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions