11# Type System
22
3- The GraphQL Type system describes the capabilities of a GraphQL server and is
3+ The GraphQL Type system describes the capabilities of a GraphQL service and is
44used to determine if a query is valid. The type system also describes the
55input types of query variables to determine if values provided at runtime
66are valid.
@@ -346,7 +346,7 @@ promises to conform to ISO-8601. When querying a field of type `Time`, you can
346346then rely on the ability to parse the result with an ISO-8601 parser and use a
347347client-specific primitive for time. Another example of a potentially useful
348348custom scalar is ` Url ` , which serializes as a string, but is guaranteed by
349- the server to be a valid URL.
349+ the service to be a valid URL.
350350
351351``` graphql example
352352scalar Time
@@ -373,7 +373,7 @@ all built-in scalars must be omitted for brevity.
373373
374374** Result Coercion and Serialization**
375375
376- A GraphQL server , when preparing a field of a given scalar type, must uphold the
376+ A GraphQL service , when preparing a field of a given scalar type, must uphold the
377377contract the scalar type describes, either by coercing the value or producing a
378378field error if a value cannot be coerced or if coercion may result in data loss.
379379
@@ -383,21 +383,21 @@ expected return type. For example when coercing a field of type {Int} a boolean
383383{123}. However if internal type coercion cannot be reasonably performed without
384384losing information, then it must raise a field error.
385385
386- Since this coercion behavior is not observable to clients of the GraphQL server ,
386+ Since this coercion behavior is not observable to clients of the GraphQL service ,
387387the precise rules of coercion are left to the implementation. The only
388- requirement is that the server must yield values which adhere to the expected
388+ requirement is that the service must yield values which adhere to the expected
389389Scalar type.
390390
391391GraphQL scalars are serialized according to the serialization format being used.
392392There may be a most appropriate serialized primitive for each given scalar type,
393- and the server should produce each primitive where appropriate.
393+ and the service should produce each primitive where appropriate.
394394
395395See [ Serialization Format] ( #sec-Serialization-Format ) for more detailed
396396information on the serialization of scalars in common JSON and other formats.
397397
398398** Input Coercion**
399399
400- If a GraphQL server expects a scalar type as input to an argument, coercion
400+ If a GraphQL service expects a scalar type as input to an argument, coercion
401401is observable and the rules must be well defined. If an input value does not
402402match a coercion rule, a query error must be raised.
403403
@@ -425,7 +425,7 @@ that type to represent this scalar.
425425Fields returning the type {Int} expect to encounter 32-bit integer
426426internal values.
427427
428- GraphQL servers may coerce non-integer internal values to integers when
428+ GraphQL services may coerce non-integer internal values to integers when
429429reasonable without losing information, otherwise they must raise a field error.
430430Examples of this may include returning ` 1 ` for the floating-point number ` 1.0 ` ,
431431or returning ` 123 ` for the string ` "123" ` . In scenarios where coercion may lose
@@ -460,7 +460,7 @@ should use that type to represent this scalar.
460460Fields returning the type {Float} expect to encounter double-precision
461461floating-point internal values.
462462
463- GraphQL servers may coerce non-floating-point internal values to {Float} when
463+ GraphQL services may coerce non-floating-point internal values to {Float} when
464464reasonable without losing information, otherwise they must raise a field error.
465465Examples of this may include returning ` 1.0 ` for the integer number ` 1 ` , or
466466` 123.0 ` for the string ` "123" ` .
@@ -486,7 +486,7 @@ and that representation must be used here.
486486
487487Fields returning the type {String} expect to encounter UTF-8 string internal values.
488488
489- GraphQL servers may coerce non-string raw values to {String} when reasonable
489+ GraphQL services may coerce non-string raw values to {String} when reasonable
490490without losing information, otherwise they must raise a field error. Examples of
491491this may include returning the string ` "true" ` for a boolean true value, or the
492492string ` "1" ` for the integer ` 1 ` .
@@ -508,7 +508,7 @@ representation of the integers `1` and `0`.
508508
509509Fields returning the type {Boolean} expect to encounter boolean internal values.
510510
511- GraphQL servers may coerce non-boolean raw values to {Boolean} when reasonable
511+ GraphQL services may coerce non-boolean raw values to {Boolean} when reasonable
512512without losing information, otherwise they must raise a field error. Examples of
513513this may include returning ` true ` for non-zero numbers.
514514
@@ -532,14 +532,14 @@ across many formats ID could represent, from small auto-increment numbers, to
532532large 128-bit random numbers, to base64 encoded values, or string values of a
533533format like [ GUID] ( https://en.wikipedia.org/wiki/Globally_unique_identifier ) .
534534
535- GraphQL servers should coerce as appropriate given the ID formats they expect.
535+ GraphQL services should coerce as appropriate given the ID formats they expect.
536536When coercion is not possible they must raise a field error.
537537
538538** Input Coercion**
539539
540540When expected as an input type, any string (such as ` "4" ` ) or integer (such as
541541` 4 ` or ` -4 ` ) input value should be coerced to ID as appropriate for the ID
542- formats a given GraphQL server expects. Any other input value, including float
542+ formats a given GraphQL service expects. Any other input value, including float
543543input values (such as ` 4.0 ` ), must raise a query error indicating an incorrect
544544type.
545545
@@ -1376,7 +1376,7 @@ enum Direction {
13761376
13771377** Result Coercion**
13781378
1379- GraphQL servers must return one of the defined set of possible values. If a
1379+ GraphQL services must return one of the defined set of possible values. If a
13801380reasonable coercion is not possible they must raise a field error.
13811381
13821382** Input Coercion**
@@ -1562,7 +1562,7 @@ like this: `pets: [Pet]`. Nesting lists is allowed: `matrix: [[Int]]`.
15621562
15631563**Result Coercion **
15641564
1565- GraphQL servers must return an ordered list as the result of a list type . Each
1565+ GraphQL services must return an ordered list as the result of a list type . Each
15661566item in the list must be the result of a result coercion of the item type . If a
15671567reasonable coercion is not possible it must raise a field error . In
15681568particular , if a non -list is returned , the coercion should fail , as this
0 commit comments