File tree Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Expand file tree Collapse file tree 2 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ InterfaceTypeDefinition : Description? interface Name Directives[Const]? FieldDe
228228UnionTypeDefinition : Description? union Name Directives[ Const] ? = UnionMembers
229229
230230UnionMembers :
231- - NamedType
231+ - ` | ` ? NamedType
232232 - UnionMembers | NamedType
233233
234234EnumTypeDefinition : Description? enum Name Directives[ Const] ? { EnumValueDefinition+ }
@@ -240,7 +240,7 @@ InputObjectTypeDefinition : Description? input Name Directives[Const]? { InputVa
240240DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
241241
242242DirectiveLocations :
243- - DirectiveLocation
243+ - ` | ` ? DirectiveLocation
244244 - DirectiveLocations | DirectiveLocation
245245
246246DirectiveLocation : one of
Original file line number Diff line number Diff line change @@ -946,7 +946,7 @@ Interface types have the potential to be invalid if incorrectly defined.
946946UnionTypeDefinition : Description? union Name Directives[ Const] ? = UnionMembers
947947
948948UnionMembers :
949- - NamedType
949+ - ` | ` ? NamedType
950950 - UnionMembers | NamedType
951951
952952GraphQL Unions represent an object that could be one of a list of GraphQL
@@ -1010,6 +1010,15 @@ Instead, the query would be:
10101010}
10111011```
10121012
1013+ Union members may be defined with an optional leading ` | ` character to aid
1014+ formatting when representing a longer list of possible types:
1015+
1016+ ``` graphql example
1017+ union SearchResult =
1018+ | Photo
1019+ | Person
1020+ ```
1021+
10131022** Result Coercion**
10141023
10151024The union type should have some way of determining which object a given result
@@ -1277,7 +1286,7 @@ a non-null input type as invalid.
12771286DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
12781287
12791288DirectiveLocations :
1280- - DirectiveLocation
1289+ - ` | ` ? DirectiveLocation
12811290 - DirectiveLocations | DirectiveLocation
12821291
12831292DirectiveLocation : one of
@@ -1311,6 +1320,16 @@ fragment SomeFragment on SomeType {
13111320}
13121321```
13131322
1323+ Directive locations may be defined with an optional leading ` | ` character to aid
1324+ formatting when representing a longer list of possible locations:
1325+
1326+ ``` graphql example
1327+ directive @example on
1328+ | FIELD
1329+ | FRAGMENT_SPREAD
1330+ | INLINE_FRAGMENT
1331+ ```
1332+
13141333Directives can also be used to annotate the type system definition language
13151334as well , which is :
13161335
You can’t perform that action at this time.
0 commit comments