Skip to content

Commit

Permalink
add note about union members
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmark committed Dec 10, 2024
1 parent b2e42e8 commit 4ce2d48
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -2181,18 +2181,24 @@ SchemaCoordinate :
field, enum value, field argument, directive, or directive argument.

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

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

Note: Unions members are not valid schema coordinates since they are references
to existing types in the schema. This preserves the 1:1 mapping property of
schema coordinates as stated above.

Note: A {SchemaCoordinate} is not a definition within a GraphQL {Document}, but
a separate standalone grammar, intended to be used by tools to reference types,
fields, and other *schema element*s. For example as references within
documentation, or as lookup keys in usage frequency tracking.
fields, and other *schema element*s. Examples include: as references within
documentation to refer to types and fields in a schema, a lookup key that can
be used in logging tools to track how often particular fields are queried in
production.

**Semantics**

Expand Down

0 comments on commit 4ce2d48

Please sign in to comment.