Skip to content

Commit 12270ac

Browse files
Add some content
Co-Authored-By: yaacovcr <[email protected]>
1 parent baa39f1 commit 12270ac

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

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

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ input ExampleInput {
2828
}
2929
```
3030

31-
This goes hand-in-hand with the deprecation of `astFromValue` in favor of `valueToLiteral`.
31+
This goes hand-in-hand with the deprecation of `astFromValue` in favor of `valueToLiteral` or `default: { value: <externalValue> }`.
3232

3333
```ts
3434
// Before (deprecated)
@@ -127,6 +127,18 @@ The `initialCount` argument of the `@stream` directive is now non-nullable.
127127

128128
See https://github.com/graphql/graphql-js/pull/4322
129129

130+
## GraphQLSchemas converted to configuration may no longer be assumed valid
131+
132+
The `assumeValid` config property exported by the `GraphQLSchema.toConfig()` method now passes through the original
133+
flag passed on creation of the `GraphQLSchema`.
134+
Previously, the `assumeValid` property would be to `true` if validation had been run, potentially concealing the original intent.
135+
136+
See https://github.com/graphql/graphql-js/pull/4244 and https://github.com/graphql/graphql-js/issues/3448
137+
138+
## `coerceInputValue` returns `undefined` on error
139+
140+
`coerceInputValue` now aborts early when an error occurs, to optimize execution speed on the happy path.
141+
Use the `validateInputValue` helper to retrieve the actual errors.
130142

131143
## Removals
132144

@@ -143,15 +155,10 @@ See https://github.com/graphql/graphql-js/pull/4322
143155
- Deprecated `astFromValue` use `valueToLiteral` instead, when leveraging `valueToLiteral` ensure
144156
that you are working with externally provided values i.e. the SDL provided defaultValue to a variable.
145157
- Deprecated `valueFromAST` use `coerceInputLiteral` instead
158+
- Deprecated `findBreakingChanges()` and `findDangerousChanges()`. Use `findSchemaChanges()` instead, which can also be used to find safe changes.
159+
- Deprecated `serialize`. `parseValue`, and `parseLiteral` properties on scalar type configuration. Use `coerceOutputValue`, `coerceInputValue`, and `coerceInputLiteral` instead.
146160

147-
## New Features
148-
149-
- Added `hideSuggestions` option to `execute`/`validate`/`subscribe`/... to hide schema-suggestions in error messages
150-
- Added `abortSignal` option to `graphql()`, `execute()`, and `subscribe()` allows cancellation of these methods;
151-
the `abortSignal` can also be passed to field resolvers to cancel asynchronous work that they initiate.
152-
- `extensions` support `symbol` keys, in addition to the normal string keys.
153-
154-
## New Experimental Features
161+
## Experimental Features
155162

156163
### Experimental Support for Incremental Delivery
157164

@@ -166,3 +173,15 @@ See https://github.com/graphql/graphql-js/pull/4322
166173
- new experimental `Kind.FRAGMENT_ARGUMENT` for visiting
167174
- new experimental `TypeInfo` methods and options for handling fragment arguments.
168175
- coerce AST via new function `coerceInputLiteral()` with experimental fragment variables argument (as opposed to deprecated `valueFromAST()` function).
176+
177+
## Features
178+
179+
- Added `hideSuggestions` option to `execute`/`validate`/`subscribe`/... to hide schema-suggestions in error messages
180+
- Added `abortSignal` option to `graphql()`, `execute()`, and `subscribe()` allows cancellation of these methods;
181+
the `abortSignal` can also be passed to field resolvers to cancel asynchronous work that they initiate.
182+
- `extensions` support `symbol` keys, in addition to the normal string keys.
183+
- Added ability for resolver functions to return async iterables.
184+
- Added `perEventExecutor` execution option to allows specifying a custom executor for subscription source stream events, which can be useful for preparing a per event execution context argument.
185+
- Added `validateInputValue` and `validateInputLiteral` helpers to validate input values and literals, respectively.
186+
- Added `replaceVariableValues` helper to replace variables within complex scalars uses as inputs. Internally, this allows variables embedded within complex scalars to finally use the correct default values.
187+
- Added new `printDirective` helper.

0 commit comments

Comments
 (0)