Skip to content

Commit f42dab5

Browse files
committed
[Clarify] Note in Scalars about omittion from Schema.
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
1 parent 737f620 commit f42dab5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

spec/Section 3 -- Type System.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ client-specific primitive for time. Another example of a potentially useful
8080
custom scalar is `Url`, which serializes as a string, but is guaranteed by
8181
the server to be a valid URL.
8282

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

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

0 commit comments

Comments
 (0)