@@ -879,9 +879,6 @@ of rules must be adhered to by every Object type in a GraphQL schema.
879879 {"\_\_" } (two underscores).
880880 2. The argument must accept a type where {IsInputType (argumentType)}
881881 returns {true }.
882- 3. If the field is a Oneof Field :
883- 1. The argument must be nullable .
884- 2. The argument must not have a default value .
8858823. An object type may declare that it implements one or more unique interfaces .
8868834. An object type must be a super -set of all interfaces it implements :
887884 1. Let this object type be {objectType }.
@@ -909,8 +906,6 @@ IsValidImplementation(type, implementedType):
909906 2. Let {implementedFieldType } be the return type of {implementedField }.
910907 3. {IsValidImplementationFieldType (fieldType, implementedFieldType)} must
911908 be {true }.
912- 6. {field } must be a Oneof Field if and only if {implementedField } is a
913- Oneof Field .
914909
915910IsValidImplementationFieldType (fieldType, implementedFieldType):
916911
@@ -984,31 +979,6 @@ May return the result:
984979The type of an object field argument must be an input type (any type except an
985980Object, Interface, or Union type).
986981
987- **Oneof Fields **
988-
989- Oneof Fields are a special variant of Object Type fields where the type system
990- asserts that exactly one of the field 's arguments must be set and non -null , all
991- others being omitted . This is useful for representing situations where a field
992- provides more than one input option to accomplish the same (or similar) goal .
993-
994- When using the type system definition language , the `@oneOf ` directive is used
995- to indicate that a Field is a Oneof Field (and thus requires exactly one of its
996- arguments be provided):
997-
998- ```graphql
999- type Query {
1000- findUser (
1001- byID : ID
1002- byUsername : String
1003- byEmail : String
1004- byRegistrationNumber : Int
1005- ): User @oneOf
1006- }
1007- ```
1008-
1009- In schema introspection , the `__Field .oneOf ` field will return {true } for Oneof
1010- Fields , and {false } for all other Fields .
1011-
1012982### Field Deprecation
1013983
1014984Fields in an object may be marked as deprecated as deemed necessary by the
@@ -1254,9 +1224,6 @@ Interface types have the potential to be invalid if incorrectly defined.
12541224 {"\_\_" } (two underscores).
12551225 2. The argument must accept a type where {IsInputType (argumentType)}
12561226 returns {true }.
1257- 3. If the field is a Oneof Field :
1258- 1. The argument must be nullable .
1259- 2. The argument must not have a default value .
126012273. An interface type may declare that it implements one or more unique
12611228 interfaces , but may not implement itself .
126212294. An interface type must be a super -set of all interfaces it implements :
@@ -1712,7 +1679,7 @@ input ExampleInputObject {
17121679| `{ b : $var }` | `{ var : null }` | Error : {b } must be non -null . |
17131680| `{ b : 123, c : "xyz" }` | `{}` | Error : Unexpected field {c } |
17141681
1715- Following are examples of input coercion for a Oneof Input Object with a
1682+ Following are examples of input coercion for a oneOf input object type with a
17161683`String ` member field `a ` and an `Int ` member field `b `:
17171684
17181685```graphql example
@@ -2007,8 +1974,7 @@ GraphQL implementations that support the type system definition language should
20071974provide the `@specifiedBy ` directive if representing custom scalar definitions .
20081975
20091976GraphQL implementations that support the type system definition language should
2010- provide the `@oneOf ` directive if the schema contains Oneof Input Objects or
2011- Oneof Fields .
1977+ provide the `@oneOf ` directive if representing Oneof Input Objects .
20121978
20131979When representing a GraphQL schema using the type system definition language any
20141980_built -in directive_ may be omitted for brevity .
@@ -2201,14 +2167,11 @@ scalar UUID @specifiedBy(url: "https://tools.ietf.org/html/rfc4122")
22012167### @oneOf
22022168
22032169```graphql
2204- directive @oneOf on INPUT_OBJECT | FIELD_DEFINITION
2170+ directive @oneOf on INPUT_OBJECT
22052171```
22062172
22072173The `@oneOf ` directive is used within the type system definition language to
2208- indicate :
2209-
2210- - an Input Object is a Oneof Input Object , or
2211- - an Object Type 's Field is a Oneof Field .
2174+ indicate an Input Object is a Oneof Input Object .
22122175
22132176```graphql example
22142177input UserUniqueCondition @oneOf {
0 commit comments