Skip to content

Commit 1ba4e19

Browse files
committed
Use repeatable instead of unique keyword. Also changed the default.
1 parent 96aab71 commit 1ba4e19

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

spec/Appendix B -- Grammar Summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ InputObjectTypeExtension :
278278
- extend input Name Directives[Const]? InputFieldsDefinition
279279
- extend input Name Directives[Const]
280280

281-
DirectiveDefinition : Description? `unique`? directive @ Name ArgumentsDefinition? on DirectiveLocations
281+
DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
282282

283283
DirectiveLocations :
284284
- `|`? DirectiveLocation

spec/Section 3 -- Type System.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ adds additional operation types, or additional directives to an existing schema.
165165
Schema extensions have the potential to be invalid if incorrectly defined.
166166

167167
1. The Schema must already be defined.
168-
2. Any unique directives provided must not already apply to the original Schema.
168+
2. Any non-`repeatable` directives provided must not already apply to the original Schema.
169169

170170

171171
## Descriptions
@@ -544,7 +544,7 @@ GraphQL tool or service which adds directives to an existing scalar.
544544
Scalar type extensions have the potential to be invalid if incorrectly defined.
545545

546546
1. The named type must already be defined and must be a Scalar type.
547-
2. Any unique directives provided must not already apply to the original Scalar type.
547+
2. Any non-`repeatable` directives provided must not already apply to the original Scalar type.
548548

549549

550550
## Objects
@@ -934,7 +934,7 @@ Object type extensions have the potential to be invalid if incorrectly defined.
934934
may share the same name.
935935
3. Any fields of an Object type extension must not be already defined on the
936936
original Object type.
937-
4. Any unique directives provided must not already apply to the original Object type.
937+
4. Any non-`repeatable` directives provided must not already apply to the original Object type.
938938
5. Any interfaces provided must not be already implemented by the original
939939
Object type.
940940
6. The resulting extended object type must be a super-set of all interfaces it
@@ -1116,7 +1116,7 @@ Interface type extensions have the potential to be invalid if incorrectly define
11161116
4. Any Object type which implemented the original Interface type must also be a
11171117
super-set of the fields of the Interface type extension (which may be due to
11181118
Object type extension).
1119-
5. Any unique directives provided must not already apply to the original Interface type.
1119+
5. Any non-`repeatable` directives provided must not already apply to the original Interface type.
11201120

11211121

11221122
## Unions
@@ -1239,7 +1239,7 @@ Union type extensions have the potential to be invalid if incorrectly defined.
12391239
3. All member types of a Union type extension must be unique.
12401240
4. All member types of a Union type extension must not already be a member of
12411241
the original Union type.
1242-
5. Any unique directives provided must not already apply to the original Union type.
1242+
5. Any non-`repeatable` directives provided must not already apply to the original Union type.
12431243

12441244
## Enums
12451245

@@ -1308,7 +1308,7 @@ Enum type extensions have the potential to be invalid if incorrectly defined.
13081308
2. All values of an Enum type extension must be unique.
13091309
3. All values of an Enum type extension must not already be a value of
13101310
the original Enum.
1311-
4. Any unique directives provided must not already apply to the original Enum type.
1311+
4. Any non-`repeatable` directives provided must not already apply to the original Enum type.
13121312

13131313

13141314
## Input Objects
@@ -1437,7 +1437,7 @@ Input object type extensions have the potential to be invalid if incorrectly def
14371437
3. All fields of an Input Object type extension must have unique names.
14381438
4. All fields of an Input Object type extension must not already be a field of
14391439
the original Input Object.
1440-
5. Any unique directives provided must not already apply to the original Input Object type.
1440+
5. Any non-`repeatable` directives provided must not already apply to the original Input Object type.
14411441

14421442

14431443
## List
@@ -1606,7 +1606,7 @@ Expected Type | Internal Value | Coerced Result
16061606

16071607
## Directives
16081608

1609-
DirectiveDefinition : Description? `unique`? directive @ Name ArgumentsDefinition? on DirectiveLocations
1609+
DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
16101610

16111611
DirectiveLocations :
16121612
- `|`? DirectiveLocation
@@ -1660,10 +1660,10 @@ fragment SomeFragment on SomeType {
16601660
}
16611661
```
16621662

1663-
Directive may be defined as unique per location with the `unique` keyword:
1663+
Directive may be defined as repeatable per location with the `repeatable` keyword:
16641664

16651665
```graphql example
1666-
unique directive @example on OBJECT | INTERFACE
1666+
directive @example repeatable on OBJECT | INTERFACE
16671667
```
16681668

16691669
Directive locations may be defined with an optional leading `|` character to aid
@@ -1715,7 +1715,7 @@ directive @invalidExample(arg: String @invalidExample) on ARGUMENT_DEFINITION
17151715
### @skip
17161716

17171717
```graphql
1718-
unique directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
1718+
directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
17191719
```
17201720

17211721
The `@skip` directive may be provided for fields, fragment spreads, and
@@ -1735,7 +1735,7 @@ query myQuery($someTest: Boolean) {
17351735
### @include
17361736

17371737
```graphql
1738-
unique directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
1738+
directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
17391739
```
17401740

17411741
The `@include` directive may be provided for fields, fragment spreads, and
@@ -1762,7 +1762,7 @@ must *not* be queried if either the `@skip` condition is true *or* the
17621762
### @deprecated
17631763

17641764
```graphql
1765-
unique directive @deprecated(
1765+
directive @deprecated(
17661766
reason: String = "No longer supported"
17671767
) on FIELD_DEFINITION | ENUM_VALUE
17681768
```

spec/Section 4 -- Introspection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,4 +418,4 @@ Fields
418418
locations this directive may be placed.
419419
* `args` returns a List of `__InputValue` representing the arguments this
420420
directive accepts.
421-
* `unique` must return a Boolean which identifies the directive as unique per location.
421+
* `repeatable` must return a Boolean which permits using the directive multiple times at the same location.

spec/Section 5 -- Validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,7 +1440,7 @@ query @skip(if: $foo) {
14401440
**Formal Specification**
14411441

14421442
* For every {location} in the document for which Directives can apply:
1443-
* Let {directives} be the set of Directives which apply to {location} and marked as `unique`.
1443+
* Let {directives} be the set of Directives which apply to {location} and not marked as `repeatable`.
14441444
* For each {directive} in {directives}:
14451445
* Let {directiveName} be the name of {directive}.
14461446
* Let {namedDirectives} be the set of all Directives named {directiveName}

0 commit comments

Comments
 (0)