Skip to content

Reject invalid directives on scalars in 15.0.0 #893

Open

Description

@oryan-block

Since #864, scalars get the directives from the schema. When one of them is undeclared or has an argument its definition doesn't have, tools logs Scalar 'Date' is built without its directives from the schema: … and builds the scalar without them, because those scalars always built before. Every other type throws a SchemaError for the same mistake.

What to change

  • throw the SchemaError in SchemaParser#createScalar instead of logging it
  • turn DirectiveTest.should warn about undeclared directives on scalars and build them without the schema's directives into a test for the error
  • mention it in the 15.0.0 release notes

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions