Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
robrichard committed Jan 3, 2025
1 parent aa9c21c commit 1728d36
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
10 changes: 3 additions & 7 deletions spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,7 @@ fragment someFragment on User {
#### @defer Arguments

- `if: Boolean! = true` - When `true`, fragment _should_ be deferred (see
related note below). When `false`, fragment will not be deferred. Defaults to
related note below). When `false`, fragment must not be deferred. Defaults to
`true` when omitted.
- `label: String` - An optional string literal (variables are disallowed) used
by GraphQL clients to identify data from responses and associate it with the
Expand All @@ -2232,10 +2232,6 @@ additional list items in subsequent responses.

The `@include` and `@skip` directives take precedence over `@stream`.

Note: The [Directives Are Defined](#sec-Directives-Are-Defined) validation rule
ensures that GraphQL Operations containing the `@stream` directive cannot be
executed by a GraphQL service that does not support this directive.

```graphql example
query myQuery($shouldStream: Boolean! = true) {
user {
Expand All @@ -2252,8 +2248,8 @@ query myQuery($shouldStream: Boolean! = true) {
#### @stream Arguments

- `if: Boolean! = true` - When `true`, field _should_ be streamed (see related
note below). When `false`, the field will not be streamed and all list items
will be initially included. Defaults to `true` when omitted.
note below). When `false`, the field must not be streamed and all list items
must be initially included. Defaults to `true` when omitted.
- `label: String` - An optional string literal (variables are disallowed) used
by GraphQL clients to identify data from responses and associate it with the
corresponding stream directive. If provided, the GraphQL service must include
Expand Down
22 changes: 11 additions & 11 deletions spec/Section 7 -- Response.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ field that is not known to be complete. Clients should expect the GraphQL
Service to incrementally deliver the remainder of indicated list field. When the
Pending Result is associated with a `@defer` directive, it indicates that the
response fields contained in the deferred fragment are not known to be complete.
Clients should expect the the GraphQL Service to incrementally deliver the
remainder of the fields contained in the deferred fragment.
Clients should expect the GraphQL Service to incrementally deliver the remainder
of the fields contained in the deferred fragment.

If the associated `@defer` or `@stream` directive contains a `label` argument,
the Pending Result must contain an entry `label` with the value of this
Expand Down Expand Up @@ -370,9 +370,9 @@ An Incremental List Result's `id` entry must match the `id` that was returned in
a prior Pending Result. This Pending Result must be associated with a `@stream`
directive.

The Incremental List Result's `path` can be determined using the prior Pending
The Incremental List Result's path can be determined using the prior Pending
Result with the same `id` as this Incremental Result. The Incremental List
Result's `path` is the same as the Pending Result's `path`.
Result's path is the same as the Pending Result's `path`.

Every Incremental List Result must contain an `items` entry. The `items` entry
must contain a list of additional list items for the response field at the
Expand All @@ -393,18 +393,18 @@ the "Errors" section.

**Incremental Object Result Format**

An Incremental List Result's `id` entry must match the `id` that was returned in
a prior Pending Result. This Pending Result must be associated with a `@defer`
directive.
An Incremental Object Result's `id` entry must match the `id` that was returned
in a prior Pending Result. This Pending Result must be associated with a
`@defer` directive.

The Incremental Object Result's `path` can be determined using the prior Pending
The Incremental Object Result's path can be determined using the prior Pending
Result with the same `id` as this Incremental Result. The Incremental Object
Result may contain a `subPath` entry. If the `subPath` entry is present, The
Incremental Object Record's path can be determined by concatenating the Pending
Incremental Object Result's path can be determined by concatenating the Pending
Result's `path` with this `subPath`. If no `subPath` entry is present, the path
is the same as the Pending Result's `path`.

Every Incremental Object Result must contain an `data` entry. The `data` entry
Every Incremental Object Result must contain a `data` entry. The `data` entry
must contain a map of additional response fields. The `data` entry in an
Incremental Object Result will be of the type of a particular field in the
GraphQL result. The Incremental Object Result's `path` will contain the path
Expand All @@ -413,7 +413,7 @@ segments of the field this data is associated with.
An Incremental Object Result's data may contain response fields that were
contained in more than one deferred fragments. In that case, the `id` of the
Incremental Object Result must point to the Pending Result that results in the
shortest `subPath`.
shortest path.

If any field errors were raised during the execution of the results in `data`
and these errors propagated to a path higher than the Incremental Object
Expand Down

0 comments on commit 1728d36

Please sign in to comment.