Skip to content

Commit 9bec236

Browse files
committed
editorial: define and link _OneOf Input Object_
1 parent b1ff1ab commit 9bec236

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

spec/Section 3 -- Type System.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,10 +1570,10 @@ objects have a separate type in the system.
15701570

15711571
**OneOf Input Objects**
15721572

1573-
OneOf Input Objects are a special variant of Input Objects where the type system
1574-
asserts that exactly one of the fields must be set and non-null, all others
1575-
being omitted. This is useful for representing situations where an input may be
1576-
one of many different options.
1573+
:: A _OneOf Input Object_ is a special variant of Input Object where the type
1574+
system asserts that exactly one of the fields must be set and non-null, all
1575+
others being omitted. This is useful for representing situations where an input
1576+
may be one of many different options.
15771577

15781578
When using the type system definition language, the `@oneOf` directive is used
15791579
to indicate that an Input Object is a OneOf Input Object (and thus requires
@@ -1683,7 +1683,7 @@ is constructed with the following rules:
16831683
variable definition does not provide a default value, the input object field
16841684
definition's default value should be used.
16851685

1686-
Further, if the input object is a OneOf Input Object, the following additional
1686+
Further, if the input object is a _OneOf Input Object_, the following additional
16871687
rules apply:
16881688

16891689
- If the input object literal or unordered map does not contain exactly one
@@ -1779,7 +1779,7 @@ input ExampleOneOfInputObject @oneOf {
17791779
returns {true}.
17801780
4. If input field type is Non-Null and a default value is not defined:
17811781
1. The `@deprecated` directive must not be applied to this input field.
1782-
5. If the Input Object is a OneOf Input Object then:
1782+
5. If the Input Object is a _OneOf Input Object_ then:
17831783
1. The type of the input field must be nullable.
17841784
2. The input field must not have a default value.
17851785
3. If an Input Object references itself either directly or through referenced
@@ -1811,7 +1811,7 @@ defined.
18111811
Input Object type.
18121812
5. The `@oneOf` directive must not be provided by an Input Object type
18131813
extension.
1814-
6. If the original Input Object is a OneOf Input Object then:
1814+
6. If the original Input Object is a _OneOf Input Object_ then:
18151815
1. All fields of the Input Object type extension must be nullable.
18161816
2. All fields of the Input Object type extension must not have default
18171817
values.

spec/Section 4 -- Introspection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ type __Type {
151151
ofType: __Type
152152
# may be non-null for custom SCALAR, otherwise null.
153153
specifiedByURL: String
154-
# should be non-null for INPUT_OBJECT only
154+
# must be non-null for INPUT_OBJECT, otherwise null.
155155
isOneOf: Boolean
156156
}
157157

@@ -375,8 +375,8 @@ Fields\:
375375
- `inputFields` must return the set of input fields as a list of `__InputValue`.
376376
- Accepts the argument `includeDeprecated` which defaults to {false}. If
377377
{true}, deprecated input fields are also returned.
378-
- `isOneOf` must return {true} when representing a OneOf Input Object, {false}
379-
otherwise.
378+
- `isOneOf` must return {true} when representing a _OneOf Input Object_,
379+
otherwise {false}.
380380
- All other fields must return {null}.
381381

382382
**List**

spec/Section 5 -- Validation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type Query {
4343

4444
type Mutation {
4545
addPet(pet: PetInput!): Pet
46-
addPets(pet: [PetInput!]!): [Pet]
46+
addPets(pets: [PetInput!]!): [Pet]
4747
}
4848

4949
enum DogCommand {
@@ -1951,7 +1951,7 @@ IsNonNullPosition(locationType, variableUsage):
19511951
- If the location of {variableUsage} is an {ObjectField}:
19521952
- Let {parentObjectValue} be the {ObjectValue} containing {ObjectField}.
19531953
- Let {parentLocationType} be the expected type of {ObjectValue}.
1954-
- If {parentLocationType} is a OneOf Input Object type, return {true}.
1954+
- If {parentLocationType} is a _OneOf Input Object_ type, return {true}.
19551955
- Return {false}.
19561956

19571957
AreTypesCompatible(variableType, locationType):

0 commit comments

Comments
 (0)