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 @@ -943,7 +943,7 @@ Interface types have the potential to be invalid if incorrectly defined.
943943UnionTypeDefinition : Description? union Name Directives[ Const] ? = UnionMembers
944944
945945UnionMembers :
946- - NamedType
946+ - ` | ` ? NamedType
947947 - UnionMembers | NamedType
948948
949949GraphQL Unions represent an object that could be one of a list of GraphQL
@@ -1007,6 +1007,15 @@ Instead, the query would be:
10071007}
10081008```
10091009
1010+ Union members may be defined with an optional leading ` | ` character to aid
1011+ formatting when representing a longer list of possible types:
1012+
1013+ ``` graphql example
1014+ union SearchResult =
1015+ | Photo
1016+ | Person
1017+ ```
1018+
10101019** Result Coercion**
10111020
10121021The union type should have some way of determining which object a given result
@@ -1273,7 +1282,7 @@ a non-null input type as invalid.
12731282DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
12741283
12751284DirectiveLocations :
1276- - DirectiveLocation
1285+ - ` | ` ? DirectiveLocation
12771286 - DirectiveLocations | DirectiveLocation
12781287
12791288DirectiveLocation : one of
@@ -1307,6 +1316,16 @@ fragment SomeFragment on SomeType {
13071316}
13081317```
13091318
1319+ Directive locations may be defined with an optional leading ` | ` character to aid
1320+ formatting when representing a longer list of possible locations:
1321+
1322+ ``` graphql example
1323+ directive @example on
1324+ | FIELD
1325+ | FRAGMENT_SPREAD
1326+ | INLINE_FRAGMENT
1327+ ```
1328+
13101329Directives can also be used to annotate the type system definition language
13111330as well , which is :
13121331
You can’t perform that action at this time.
0 commit comments