Skip to content

P30: Fixed the explanatory text for algorithm checking uniqueness of non-repeatable directives #975

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

Merged
merged 3 commits into from
Jan 5, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1488,13 +1488,13 @@ query @skip(if: $foo) {

**Explanatory Text**

Directives are used to describe some metadata or behavioral change on the
definition they apply to. When more than one directive of the same name is used,
the expected metadata or behavior becomes ambiguous, therefore only one of each
directive is allowed per location.
GraphQL allows directives that are defined as `repeatable` to be used
more than once on the definition they apply to, possibly with different arguments.
In contrast, if a directive is not `repeatable`, then only one occurence of it
is allowed per location.

For example, the following document will not pass validation because `@skip` has
been used twice for the same field:
For example, the following document will not pass validation because non-repeatable
`@skip` has been used twice for the same field:

```raw graphql counter-example
query ($foo: Boolean = true, $bar: Boolean = false) {
Expand Down