Skip to content

Commit 4ce2d48

Browse files
committed
add note about union members
1 parent b2e42e8 commit 4ce2d48

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

spec/Section 3 -- Type System.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,18 +2181,24 @@ SchemaCoordinate :
21812181
field, enum value, field argument, directive, or directive argument.
21822182

21832183
A *schema coordinate* is always unique. Each *schema element* may be referenced
2184-
by exactly one possible schema coordinate.
2184+
by exactly one possible schema coordinate. There is a bidirectional 1:1 mapping.
21852185

21862186
A *schema coordinate* may refer to either a defined or built-in *schema element*.
21872187
For example, `String` and `@deprecated(reason:)` are both valid schema
21882188
coordinates which refer to built-in schema elements. However it must not refer
21892189
to a meta-field. For example, `Business.__typename` is *not* a valid
21902190
schema coordinate.
21912191

2192+
Note: Unions members are not valid schema coordinates since they are references
2193+
to existing types in the schema. This preserves the 1:1 mapping property of
2194+
schema coordinates as stated above.
2195+
21922196
Note: A {SchemaCoordinate} is not a definition within a GraphQL {Document}, but
21932197
a separate standalone grammar, intended to be used by tools to reference types,
2194-
fields, and other *schema element*s. For example as references within
2195-
documentation, or as lookup keys in usage frequency tracking.
2198+
fields, and other *schema element*s. Examples include: as references within
2199+
documentation to refer to types and fields in a schema, a lookup key that can
2200+
be used in logging tools to track how often particular fields are queried in
2201+
production.
21962202

21972203
**Semantics**
21982204

0 commit comments

Comments
 (0)