Skip to content

Commit 5704146

Browse files
authored
Include the compatible graphql version to incremental delivery docs (#7834)
Updated the [documentation on incremental delivery](https://www.apollographql.com/docs/apollo-server/workflow/requests#incremental-delivery-experimental) to include the specific prerelease version of graphQL that Apollo Server is compatible with for incremental delivery. The current docs state "As of September 2022...", but a new pre release version was made available in 2023 https://github.com/graphql/graphql-js/releases/tag/v17.0.0-alpha.3 and this appears to contain a breaking change in the incremental payload delivery.
1 parent c156742 commit 5704146

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
node-version: "18"
6565
# Install a prerelease of graphql-js 17 with incremental delivery support.
6666
# --legacy-peer-deps because nothing expects v17 yet.
67-
- run: npm i --legacy-peer-deps graphql@17.0.0-alpha.1.canary.pr.3361.04ab27334641e170ce0e05bc927b972991953882
67+
- run: npm i --legacy-peer-deps graphql@17.0.0-alpha.2
6868
- run: npm run test:ci
6969
- run: npm run test:smoke
7070

docs/source/workflow/requests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ For more details, see [the CSRF prevention documentation](../security/cors#preve
9191

9292
## Incremental delivery (experimental)
9393

94-
Incremental delivery is a [Stage 2: Draft Proposal](https://github.com/graphql/graphql-spec/pull/742) to the GraphQL specification which adds `@defer` and `@stream` executable directives. These directives allow clients to specify that parts of an operation can be sent after an initial response, so that slower fields do not delay all other fields. As of September 2022, the `graphql` library (also known as `graphql-js`) upon which Apollo Server is built implements incremental delivery only in the unreleased major version 17. If a pre-release of `graphql@17` is installed in your server, Apollo Server 4 can execute these incremental delivery directives and provide streaming [`multipart/mixed`](https://github.com/graphql/graphql-over-http/blob/main/rfcs/IncrementalDelivery.md) responses.
94+
Incremental delivery is a [Stage 2: Draft Proposal](https://github.com/graphql/graphql-spec/pull/742) to the GraphQL specification which adds `@defer` and `@stream` executable directives. These directives allow clients to specify that parts of an operation can be sent after an initial response, so that slower fields do not delay all other fields. As of September 2022, the `graphql` library (also known as `graphql-js`) upon which Apollo Server is built implements incremental delivery only in the unreleased major version 17. If a pre-release of `graphql@17.0.0-alpha.2` is installed in your server, Apollo Server 4 can execute these incremental delivery directives and provide streaming [`multipart/mixed`](https://github.com/graphql/graphql-over-http/blob/main/rfcs/IncrementalDelivery.md) responses.
9595

9696
Support for incremental delivery in graphql version 17 is [opt-in](https://github.com/robrichard/defer-stream-wg/discussions/12), meaning the directives are not defined by default. In order to use `@defer` or `@stream`, you must provide the appropriate definition(s) in your SDL. The definitions below can be pasted into your schema as-is:
9797

smoke-test/prepare.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ npm i
2121
if [[ -n "${INCREMENTAL_DELIVERY_TESTS_ENABLED:-}" ]]; then
2222
npm i --no-save --legacy-peer-deps \
2323
"$TARBALL_DIR"/*.tgz \
24-
graphql@17.0.0-alpha.1.canary.pr.3361.04ab27334641e170ce0e05bc927b972991953882
24+
graphql@17.0.0-alpha.2
2525
else
2626
npm i --no-save "$TARBALL_DIR"/*.tgz
2727
fi

0 commit comments

Comments
 (0)