From f42dab54e9503abb027d52fd28c7745918143e90 Mon Sep 17 00:00:00 2001 From: Lee Byron Date: Fri, 28 Oct 2016 12:40:05 -0700 Subject: [PATCH] [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 --- spec/Section 3 -- Type System.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index 292701bff..0ddca1edc 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -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