Skip to content

Commit 3ecdb33

Browse files
authored
Editorial changes
1 parent d4f6ad8 commit 3ecdb33

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

spec/Section 3 -- Type System.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,15 +1449,16 @@ objects have a separate type in the system.
14491449

14501450
**Circular References**
14511451

1452-
Input Objects are allowed to reference other Input Objects. A circular reference
1453-
occurs when an Input Object references itself either directly or through
1454-
referenced Input Objects.
1452+
Input Objects are allowed to reference other Input Objects as field types. A
1453+
circular reference occurs when an Input Object references itself either directly
1454+
or through referenced Input Objects.
14551455

14561456
Circular references are generally allowed, however they may not be defined as an
1457-
unbroken chain of Non-Null fields. Such Input Objects are invalid, because there
1458-
is no way to provide a legal value for them.
1457+
unbroken chain of Non-Null singular fields. Such Input Objects are invalid,
1458+
because there is no way to provide a legal value for them.
14591459

1460-
The following examples are allowed:
1460+
This example of a circularly-referenced input type is valid as the field `self`
1461+
may be omitted or the value {null}.
14611462

14621463
```graphql example
14631464
input Example {
@@ -1466,7 +1467,7 @@ input Example {
14661467
}
14671468
```
14681469

1469-
This is fine because a value for `self` may simply be omitted from the arguments.
1470+
This example is also valid as the field `self` may be an empty List.
14701471

14711472
```graphql example
14721473
input Example {
@@ -1475,9 +1476,8 @@ input Example {
14751476
}
14761477
```
14771478

1478-
This also works as `self` can just contain an empty list.
1479-
1480-
The following examples are invalid:
1479+
This example of a circularly-referenced input type is invalid as the field
1480+
`self` cannot be provided a finite value.
14811481

14821482
```graphql counter-example
14831483
input Example {
@@ -1486,6 +1486,9 @@ input Example {
14861486
}
14871487
```
14881488

1489+
This example is also invalid, as there is a non-null singular circular reference
1490+
via the `First.second` and `Second.first` fields.
1491+
14891492
```graphql counter-example
14901493
input First {
14911494
second: Second!
@@ -1578,7 +1581,7 @@ Literal Value | Variables | Coerced Value
15781581
returns {true}.
15791582
3. If an Input Object references itself either directly or through referenced
15801583
Input Objects, at least one of the fields in the chain of references must be
1581-
either nullable or a List.
1584+
either a nullable or a List type.
15821585

15831586

15841587
### Input Object Extensions

0 commit comments

Comments
 (0)