Skip to content

Commit d977f66

Browse files
authored
docs: post 17.rc-0 update (#4817)
1 parent 39f865f commit d977f66

7 files changed

Lines changed: 73 additions & 37 deletions

File tree

website/pages/docs/experimental-specification-features.mdx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ sidebarTitle: Experimental Specification Features
55

66
# Experimental Specification Features
77

8-
GraphQL.js v17 release candidate supports several GraphQL specification
9-
proposals. This page lists experimental features available in the v17
10-
release-candidate line; not every feature listed here is new to v17. These
11-
features are intentionally explicit: syntax usually requires a parser option or
12-
schema directive, and execution behavior usually requires a specific executor.
8+
GraphQL.js v17 adds several experimental GraphQL specification proposals.
9+
These features are intentionally explicit: syntax usually requires a parser
10+
option or schema directive, and execution behavior usually requires a
11+
specific executor.
1312

1413
GraphQL.js-specific runtime APIs, such as abort signals, execution hooks, and
1514
the harness API, are documented separately because they are not GraphQL language

website/pages/docs/getting-started.mdx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ import { Tabs } from 'nextra/components';
1111

1212
## Prerequisites
1313

14-
Before getting started, you should have at least Node 20 installed, the examples can be tweaked to work with Node versions
15-
before that by switching to require syntax.
16-
For this guide, we won't use any language features that require transpilation, but we will use some ES6 features like
17-
[Promises](http://web.dev/articles/promises/), classes,
18-
and arrow functions, so if you aren't familiar with them you might want to read up on them first.
14+
Before getting started, you should have Node.js 22 or newer installed. For this
15+
guide, we won't use any language features that require transpilation, but we
16+
will use some ES6 features like [Promises](http://web.dev/articles/promises/),
17+
classes, and arrow functions, so if you aren't familiar with them you might want
18+
to read up on them first.
1919

2020
> Alternatively you can start from [this StackBlitz](https://stackblitz.com/edit/stackblitz-starters-znvgwr) - if you choose
2121
> this route you can skip to [Basic Types](./basic-types.mdx).
2222
23-
GraphQL.js v16 is the current stable release. v17 is available as a release
24-
candidate for final testing and feedback before the stable v17 release.
23+
GraphQL.js v17 is the current stable release. GraphQL.js v16 remains available
24+
for projects that still need older Node.js versions.
2525

2626
## Setting Up Your Project
2727

28-
To create a new project and install the latest stable release (v16) in your
28+
To create a new project and install the latest stable release (v17) in your
2929
current directory:
3030

3131
```sh npm2yarn
@@ -50,11 +50,10 @@ Update your `package.json` to include `"type": "module"`:
5050
}
5151
```
5252

53-
To try the v17 release candidate instead, use Node.js 22 or newer and install
54-
the `rc` package tag:
53+
To install the latest v16 release instead, use the v16 package tag:
5554

5655
```sh npm2yarn
57-
npm install graphql@rc --save
56+
npm install graphql@16 --save
5857
```
5958

6059
## Writing Code

website/pages/docs/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,14 @@ JavaScript and TypeScript.
1212

1313
## Start here
1414

15-
GraphQL.js v16 is the current stable release line, and a v17 release candidate
16-
is available for final testing and feedback. If you are upgrading from an older
15+
GraphQL.js v17 is the current release line. If you are upgrading from an older
1716
major version, follow each upgrade guide in sequence until you reach your target
1817
version.
1918

2019
- **Upgrade guides:** [v14 to v15](/upgrade-guides/v14-v15),
2120
[v15 to v16](/upgrade-guides/v15-v16),
2221
[v16 to v17](/upgrade-guides/v16-v17)
23-
- **API reference:** [v16 stable](/api-v16/graphql),
24-
[v17 release candidate](/api-v17/graphql)
22+
- **API reference:** [v16](/api-v16/graphql), [v17](/api-v17/graphql)
2523
- **Specification experiments:**
2624
[Experimental Specification Features](/docs/experimental-specification-features)
2725
- **GraphQL.js runtime APIs:** [GraphQL Harness](/docs/graphql-harness),

website/pages/docs/oneof-input-objects.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,33 @@ In GraphQL.js v17, OneOf coercion is stricter around defaults, unknown fields,
104104
`undefined`, and values that are present before coercion but invalid after
105105
coercion. Schemas that accidentally rely on ambiguous OneOf inputs should fail
106106
earlier and with clearer errors.
107+
108+
## Recursive OneOf input objects
109+
110+
Recursive input objects are valid only when a client can provide a finite value.
111+
For OneOf input objects, that means at least one branch must eventually escape
112+
the cycle through a scalar, enum, list, nullable non-OneOf field, or another
113+
input object that can be provided a finite value.
114+
115+
This schema is invalid because the only possible value for `A` points back to
116+
`A`:
117+
118+
```graphql
119+
input A @oneOf {
120+
self: A
121+
}
122+
```
123+
124+
Add a real escape branch or move the recursive shape into a nullable field on a
125+
regular input object:
126+
127+
```graphql
128+
input A @oneOf {
129+
id: ID
130+
nested: NestedA
131+
}
132+
133+
input NestedA {
134+
value: A
135+
}
136+
```

website/pages/upgrade-guides/v14-v15.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import { Callout } from 'nextra/components';
1010
# What Changed in GraphQL.js v15
1111

1212
<Callout type="info">
13-
GraphQL.js v15 is an older release line. GraphQL.js v16 is the current stable
14-
release line, and a v17 release candidate is available for final testing and
15-
feedback. If you are upgrading from v14, use this guide first, then continue
16-
through [v15 to v16](/upgrade-guides/v15-v16) and [v16 to
17-
v17](/upgrade-guides/v16-v17).
13+
GraphQL.js v15 is an older release line. If you are upgrading from v14, use
14+
this guide first, then continue through [v15 to v16](/upgrade-guides/v15-v16)
15+
and [v16 to v17](/upgrade-guides/v16-v17).
1816
</Callout>
1917

2018
GraphQL.js v15 is mainly a compatibility cleanup and SDL modernization release.

website/pages/upgrade-guides/v15-v16.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ import { Callout } from 'nextra/components';
1010
# What Changed in GraphQL.js v16
1111

1212
<Callout type="info">
13-
GraphQL.js v16 is the current stable release line on npm, and a v17 release
14-
candidate is available for final testing and feedback. If you are upgrading
15-
from v15, use this guide first, then continue with [v16 to
16-
v17](/upgrade-guides/v16-v17) when you are ready to test the release
17-
candidate.
13+
GraphQL.js v16 is an older release line. If you are upgrading from v15, use
14+
this guide first, then continue with [v16 to v17](/upgrade-guides/v16-v17).
1815
</Callout>
1916

2017
GraphQL.js v16 has been the stable major release line since 2021. Upgrading

website/pages/upgrade-guides/v16-v17.mdx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { Callout } from 'nextra/components';
1010
# What Changed in GraphQL.js v17
1111

1212
<Callout type="info">
13-
GraphQL.js v17 has a release candidate available for final testing and
14-
feedback. Use this guide to prepare v16 projects for testing the
15-
release-candidate line.
13+
GraphQL.js v17 is the current release line. Use this guide to move v16
14+
projects onto v17 and to review compatibility work before adopting optional
15+
v17 features.
1616
</Callout>
1717

1818
GraphQL.js v17 keeps the core programming model: build a schema, parse a
@@ -175,10 +175,10 @@ GraphQL.js runtime APIs.
175175

176176
This guide is for projects that depend on GraphQL.js, including applications,
177177
servers, libraries, and tools. It compares the latest v16 release line with the
178-
current v17 release candidate, and focuses on differences you will see when
179-
testing that RC from an up-to-date v16 project. If a change is already present
180-
in both lines, including v17 work that also shipped in v16, it is not listed
181-
here as v16-to-v17 migration work.
178+
current v17 release line, and focuses on differences you will see when moving
179+
from an up-to-date v16 project. If a change is already present in both lines,
180+
including v17 work that also shipped in v16, it is not listed here as
181+
v16-to-v17 migration work.
182182

183183
Changes described below use these labels:
184184

@@ -721,6 +721,16 @@ are now `Boolean! = false`. The `includeDeprecated` argument on
721721
should omit the argument or pass a Boolean value; queries that pass
722722
`includeDeprecated: null` to those fields are invalid in v17.
723723

724+
**Behavioral tightening.** Input object cycle validation now checks whether an
725+
input object can be provided any finite value. This preserves the existing
726+
non-null input-object cycle checks and also rejects recursive OneOf input
727+
objects where every possible branch leads back into the same unbreakable input
728+
object cycle.
729+
730+
**Behavioral tightening.** SDL directive validation now applies directive
731+
location rules consistently to field, argument, and input-field definitions
732+
inside type and input-object extensions.
733+
724734
### Programmatic schema APIs
725735

726736
**New stable API.** v17 exposes TypeScript schema element types and runtime
@@ -960,6 +970,11 @@ separated from behavior changes.
960970
directives and directive extensions are now parsed by default.
961971
- Update built-in scalar tests for JavaScript `bigint` values if your host
962972
passes `bigint` values directly.
973+
- Fix input-object cycles that cannot produce a finite value, including
974+
recursive OneOf input objects with no scalar, enum, list, or nullable escape
975+
branch.
976+
- Audit directives on type extensions; v17 validates directive locations on
977+
extension fields, arguments, and input fields consistently with definitions.
963978

964979
### Execution and subscriptions
965980

0 commit comments

Comments
 (0)