Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend incorrectly allows repeating of non-repeatable directives #2442

Closed
m14t opened this issue Feb 7, 2020 · 1 comment · Fixed by #2446
Closed

extend incorrectly allows repeating of non-repeatable directives #2442

m14t opened this issue Feb 7, 2020 · 1 comment · Fixed by #2446

Comments

@m14t
Copy link
Contributor

m14t commented Feb 7, 2020

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

@IvanGoncharov
Copy link
Member

@m14t Thanks for tracking this issue and especially for PR with a test case.
Fixed in #2446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants