Skip to content

extend incorrectly allows repeating of non-repeatable directives #2442

Closed
@m14t

Description

@m14t

While working on #2276, it was discovered that it was possible to extend a type of a non-repeatable directive multiple times. [comment].

Simple example that should NOT be allowed:

directive @foo on SCALAR

type Query {
    someField: SomeScalar
}

scalar SomeScalar @foo

extend scalar SomeScalar @foo

It's my understanding that extend should simply try to add the directive here to the previous list of directives, and that should only be allowed if the directive is either not present, or is repeatable.

PR with failing test case: #2440

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