Skip to content

Commit 3d03cab

Browse files
rivantsovromanivantsovleebyron
authored
P30: Fixed the explanatory text for algorithm checking uniqueness of non-repeatable directives (#975)
* Fixed the explanatory text for algorithm checking uniqueness of non-repeatable directives * lint * lint fixes Co-authored-by: Roman Ivantsov <[email protected]> Co-authored-by: Lee Byron <[email protected]>
1 parent 342b838 commit 3d03cab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/Section 5 -- Validation.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1488,13 +1488,13 @@ query @skip(if: $foo) {
14881488

14891489
**Explanatory Text**
14901490

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

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

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

0 commit comments

Comments
 (0)