@@ -1859,7 +1859,7 @@ non-null input type as invalid.
18591859**Type Validation **
18601860
186118611. A Non -Null type must not wrap another Non -Null type .
1862- 1. A Non -Null type must not wrap a Null - Only - On - Error type .
1862+ 1. A Non -Null type must not wrap a Semantic - Non - Null type .
18631863
18641864### Combining List and Non-Null
18651865
@@ -1893,82 +1893,82 @@ Following are examples of result coercion with various types and values:
18931893| `[Int !]!` | `[1, 2, null ]` | Error : Item cannot be null |
18941894| `[Int !]!` | `[1, 2, Error ]` | Error : Error occurred in item |
18951895
1896- ## Null-Only-On-Error
1896+ ## Semantic-Non-Null
18971897
1898- The GraphQL Null - Only - On - Error type is an alternative to the GraphQL Non -Null
1898+ The GraphQL Semantic - Non - Null type is an alternative to the GraphQL Non -Null
18991899type to disallow null unless accompanied by a field error . This type wraps an
19001900underlying type , and this type acts identically to that wrapped type , with the
1901- exception that {null } will result in a field error being raised . A trailing
1902- asterisk is used to denote a field that uses a Null - Only - On - Error type like
1903- this : `name : String * `.
1901+ exception that {null } will result in a field error being raised . A leading
1902+ exclamation mark is used to denote a field that uses a Semantic - Non - Null type
1903+ like this : `name : ! String `.
19041904
1905- Null - Only - On - Error types are only valid for use as an _output type_ ; they must
1905+ Semantic - Non - Null types are only valid for use as an _output type_ ; they must
19061906not be used as an _input type_ .
19071907
19081908**Nullable vs . Optional **
19091909
1910- Fields that return Null - Only - On - Error types will never return the value {null }
1911- if queried _unless_ an error has been logged for that field .
1910+ Fields that return Semantic - Non - Null types will never return the value {null } if
1911+ queried _unless_ an error has been logged for that field .
19121912
19131913**Result Coercion **
19141914
1915- To coerce the result of a Null - Only - On - Error type , the coercion of the wrapped
1915+ To coerce the result of a Semantic - Non - Null type , the coercion of the wrapped
19161916type should be performed . If that result was not {null }, then the result of
1917- coercing the Null - Only - On - Error type is that result . If that result was {null },
1917+ coercing the Semantic - Non - Null type is that result . If that result was {null },
19181918then a _field error_ must be raised .
19191919
1920- Note : When a _field error_ is raised on a Null - Only - On - Error value , the error
1920+ Note : When a _field error_ is raised on a Semantic - Non - Null value , the error
19211921does not propagate to the parent field , instead {null } is used for the value .
19221922For more information on this process , see
19231923[Handling Field Errors ](#sec-Handling-Field-Errors) within the Execution
19241924section.
19251925
19261926**Input Coercion**
19271927
1928- Null-Only-On-Error types are never valid inputs.
1928+ Semantic-Non-Null types are never valid inputs.
19291929
19301930**Type Validation**
19311931
1932- 1. A Null-Only-On-Error type must wrap an _output type_.
1933- 1. A Null-Only-On-Error type must not wrap another Null-Only-On-Error type.
1934- 1. A Null-Only-On-Error type must not wrap a Non-Null type.
1932+ 1. A Semantic-Non-Null type must wrap an _output type_.
1933+ 1. A Semantic-Non-Null type must not wrap another Semantic-Non-Null type.
1934+ 1. A Semantic-Non-Null type must not wrap a Non-Null type.
19351935
1936- ### Combining List and Null-Only-On-Error
1936+ ### Combining List and Semantic-Non-Null
19371937
1938- The List and Null-Only-On-Error wrapping types can compose, representing more
1939- complex types. The rules for result coercion of Lists and Null-Only-On-Error
1938+ The List and Semantic-Non-Null wrapping types can compose, representing more
1939+ complex types. The rules for result coercion of Lists and Semantic-Non-Null
19401940types apply in a recursive fashion.
19411941
1942- For example if the inner item type of a List is Null-Only-On-Error (e.g.
1943- `[T*]`), then that List may not contain any {null } items unless associated field
1944- errors were raised . However if the inner type of a Null - Only - On - Error is a List
1945- (e.g. ` [T]* `), then {null } is not accepted without an accompanying field error
1946- being raised , however an empty list is accepted .
1942+ For example if the inner item type of a List is Semantic-Non-Null (e.g. `[!T]`),
1943+ then that List may not contain any {null } items unless associated field errors
1944+ were raised . However if the inner type of a Semantic - Non - Null is a List (e.g.
1945+ `! [T]`), then {null } is not accepted without an accompanying field error being
1946+ raised , however an empty list is accepted .
19471947
19481948Following are examples of result coercion with various types and values :
19491949
19501950| Expected Type | Internal Value | Coerced Result |
19511951| ------------- | --------------- | ------------------------------------------- |
1952- | `[Int ]* ` | `[1, 2, 3]` | `[1, 2, 3]` |
1953- | `[Int ]* ` | `null ` | `null ` (With logged coercion error) |
1954- | `[Int ]* ` | `[1, 2, null ]` | `[1, 2, null ]` |
1955- | `[Int ]* ` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1956- | `[Int !]* ` | `[1, 2, 3]` | `[1, 2, 3]` |
1957- | `[Int !]* ` | `null ` | `null ` (With logged coercion error) |
1958- | `[Int !]* ` | `[1, 2, null ]` | `null ` (With logged coercion error) |
1959- | `[Int !]* ` | `[1, 2, Error ]` | `null ` (With logged error) |
1960- | `[Int * ]` | `[1, 2, 3]` | `[1, 2, 3]` |
1961- | `[Int * ]` | `null ` | `null ` |
1962- | `[Int * ]` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1963- | `[Int * ]` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1964- | `[Int * ]!` | `[1, 2, 3]` | `[1, 2, 3]` |
1965- | `[Int * ]!` | `null ` | Error : Value cannot be null |
1966- | `[Int * ]!` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1967- | `[Int * ]!` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1968- | `[ Int *]* ` | `[1, 2, 3]` | `[1, 2, 3]` |
1969- | `[ Int *]* ` | `null ` | `null ` (With logged coercion error) |
1970- | `[ Int *]* ` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1971- | `[ Int *]* ` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1952+ | `! [Int ]` | `[1, 2, 3]` | `[1, 2, 3]` |
1953+ | `! [Int ]` | `null ` | `null ` (With logged coercion error) |
1954+ | `! [Int ]` | `[1, 2, null ]` | `[1, 2, null ]` |
1955+ | `! [Int ]` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1956+ | `! [Int !]` | `[1, 2, 3]` | `[1, 2, 3]` |
1957+ | `! [Int !]` | `null ` | `null ` (With logged coercion error) |
1958+ | `! [Int !]` | `[1, 2, null ]` | `null ` (With logged coercion error) |
1959+ | `! [Int !]` | `[1, 2, Error ]` | `null ` (With logged error) |
1960+ | `[! Int ]` | `[1, 2, 3]` | `[1, 2, 3]` |
1961+ | `[! Int ]` | `null ` | `null ` |
1962+ | `[! Int ]` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1963+ | `[! Int ]` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1964+ | `[! Int ]!` | `[1, 2, 3]` | `[1, 2, 3]` |
1965+ | `[! Int ]!` | `null ` | Error : Value cannot be null |
1966+ | `[! Int ]!` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1967+ | `[! Int ]!` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
1968+ | `![! Int ] ` | `[1, 2, 3]` | `[1, 2, 3]` |
1969+ | `![! Int ] ` | `null ` | `null ` (With logged coercion error) |
1970+ | `![! Int ] ` | `[1, 2, null ]` | `[1, 2, null ]` (With logged coercion error) |
1971+ | `![! Int ] ` | `[1, 2, Error ]` | `[1, 2, null ]` (With logged error) |
19721972
19731973## Directives
19741974
0 commit comments