Skip to content

Commit

Permalink
[Clarify] Note in Scalars about omittion from Schema.
Browse files Browse the repository at this point in the history
Scalars can be omitted from a schema if they're never used. Likewise, scalars that are included must adhere to the spec. Added a paragraph clarifying this.

Closes #222
  • Loading branch information
leebyron committed Oct 28, 2016
1 parent 737f620 commit f42dab5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ client-specific primitive for time. Another example of a potentially useful
custom scalar is `Url`, which serializes as a string, but is guaranteed by
the server to be a valid URL.

A server may omit any of the built-in scalars from its schema, for example if a
schema does not refer to a floating-point number, then it will not include the
`Float` type. However, if a schema includes a type with the name of one of the
types described here, it must adhere to the behavior described. As an example,
a server must not include a type called `Int` and use it to represent
128-bit numbers, or internationalization information.

**Result Coercion**

A GraphQL server, when preparing a field of a given scalar type, must uphold the
Expand Down

0 comments on commit f42dab5

Please sign in to comment.