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

Return an error if a schema has repeated directives without the repeatable keyword #509

Closed
pavelnikolov opened this issue Mar 20, 2022 · 2 comments · Fixed by #525
Closed

Comments

@pavelnikolov
Copy link
Member

It was reported in #502 that this library doesn't enforce uniqueness of non-repeatable directives. This is a bug and such a restriction needs to be enforced unless the repeatable keyword is present in the directive definition.

For example, if we are given two directives:

directive @repeatabledirective repeatable on SCALAR
directive @otherdirective on SCALAR

Then only the first one (i.e. @repeatabledirective) can be repeated multiple times on the same scalar type. If we repeat the @otherdirective more than once, then that should result in an error.

The issue is considered resolved when only directives declared as repeatable can be repeated.

@ostrea
Copy link
Contributor

ostrea commented Jul 13, 2022

Good day. I would like to work on it. As far as I understand I need to update this function to return an error in case we see non repeatable directive for a second time. Is it correct?

@pavelnikolov
Copy link
Member Author

@ostrea go for it!

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

Successfully merging a pull request may close this issue.

2 participants