Skip to content

Commit 639ab1f

Browse files
committed
wording
1 parent 2393992 commit 639ab1f

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

nullability/v0.1/nullability-v0.1.graphql

+12-15
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,34 @@ The `level` argument can be used to indicate what level is semantically non null
3737
directive @semanticNonNull(field: String = null, level: Int = null) repeatable on FIELD_DEFINITION | OBJECT
3838

3939
"""
40-
Indicates that the given position stops GraphQL errors to propagate up the tree.
40+
Indicates how clients should handle errors on a given position.
4141
42-
By default, the first GraphQL error stops the parsing and fails the whole response.
43-
Using `@catch` recovers from this error and allows the parsing to continue.
44-
45-
`@catch` can be used on the schema definition. In this case, it is the default for
46-
every field that can return an error (nullable fields).
47-
If no `@catch` is applied to the schema definition, errors are not
48-
caught by default and the parsing stops at the first error.
49-
50-
The `to` argument can be used to choose how to recover from errors. See `CatchTo`
51-
for more details.
42+
When used on the schema definition, `@catch` applies to every position that can return an error.
5243
5344
The `level` argument can be used to indicate where to catch in case of lists.
5445
`level` starts at 0 if there is no list. If `level` is null, all levels catch.
46+
47+
See `CatchTo` for more details.
5548
"""
5649
directive @catch(to: CatchTo! = RESULT, level: Int = null) repeatable on FIELD | SCHEMA
5750

5851
enum CatchTo {
5952
"""
60-
Map to a result type that can contain either a value or an error.
53+
Catch the error and map the position to a result type that can contain either
54+
a value or an error.
6155
"""
6256
RESULT,
6357
"""
64-
Map to a nullable type that will be null in the case of error.
65-
This does not allow to distinguish between semantic null and error but
58+
Catch the error and map the position to a nullable type that will be null
59+
in the case of error.
60+
This does not allow to distinguish between semantic null and error null but
6661
can be simpler in some cases.
6762
"""
6863
NULL,
6964
"""
70-
Do not catch and let any exception through
65+
Throw the error.
66+
Parent fields can recover using `RESULT` or `NULL`.
67+
If no parent field recovers, the parsing stops.
7168
"""
7269
THROW
7370
}

nullability/v0.1/nullability-v0.1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<script type=module async defer src=https://specs.apollo.dev/inject-logo.js></script>
1212
```
1313

14-
This specification provides a list of directives to help dealing with nullability. For more information, see [the nullability working group GitHub](https://github.com/graphql/nullability-wg)
14+
This specification provides a list of directives to help dealing with nullability. For more information, see [the nullability working group GitHub repository.](https://github.com/graphql/nullability-wg)
1515

1616

1717
#! @semanticNonNull

0 commit comments

Comments
 (0)