From 87fe01b679351075cc4060a4e7fd93eff98d7ea5 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Mon, 23 Sep 2024 13:18:10 +0300 Subject: [PATCH] add draft --- .../tutorials/whats-new-in-graphql-js-v17.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 website/docs/tutorials/whats-new-in-graphql-js-v17.md diff --git a/website/docs/tutorials/whats-new-in-graphql-js-v17.md b/website/docs/tutorials/whats-new-in-graphql-js-v17.md new file mode 100644 index 0000000000..b90505bdb7 --- /dev/null +++ b/website/docs/tutorials/whats-new-in-graphql-js-v17.md @@ -0,0 +1,52 @@ +# What's New in graphql-js v17? + +## Specification Changes + +### New Experimental Features + +#### Experimental Support for Incremental Delivery + +- enabled only when using `experimentalExecuteIncrementally()`, use of a schema or operation with `@defer`/`@stream` directives within `execute()` will now throw. +- enable early execution with the new `enableEarlyExecution` configuration option for `experimentalExecuteIncrementally()`. + +#### Experimental Support for Fragment Arguments + +- enable with the new `experimentalFragmentArguments` configuration option for `parse()`. +- new experimental `Kind.FRAGMENT_ARGUMENT` for visiting +- new experimental `TypeInfo` methods and options for handling fragment arguments. +- coerce AST via new function `coerceInputLiteral()` with experimental fragment variables argument (as opposed to deprecated `valueFromAST()` function). + +### Clarifications + +- Fix ambiguity around when schema definition may be omitted (#3839) +- No reusing root types (#3453) + +## New API features + +- Use `coerceInputLiteral()` instead of `valueFromAST()`. +- Support for resolver functions returning async iterables. +- Expose `printDirective()` helper function. + +## API Changes: + +- Changes to the `subscribe()` function: + - `subscribe()` may now return a non-promise. + - When a subscription root field errors, `subscribe()` now returns a well-formatted `GraphQLError` rather than throwing. +- Properly type `IntrospectionType` using `TypeKind` Enum. + +## Deprecations + +- `valueFromAST()` is deprecated, use `coerceInputLiteral()` instead. + +## Removals + +- Removed deprecated `graphql/subscription` module, use `graphql/execution` instead +- Removed deprecated `getOperationRootType()` #3571, use `schema.getRootType()` instead. +- Remove deprecated `assertValidName()` and `isValidNameError()`, use `assertName()` instead. +- Removed deprecated custom `TypeInfo` argument for `validate()`. +- Remove deprecated custom `getFieldDefFn()` argument for `TypeInfo` constructor. To customize field resolution, one can subclass the `GraphQLSchema` class and override the `getField()` method. +- Remove deprecated positional arguments for the `GraphQLError` constructor. +- Remove deprecated distinct Enum types: `KindEnum`, `TokenKindEnum`, and `DirectiveLocationEnum`. +- Remove deprecated `getVisitFn()` helper function, use `getEnterLeaveForKind()` instead. +- Remove deprecated `formatError()` and `printError()` helper sfunctions, use `error.toString()` and `error.toJSON()` methods instead. +- Remove deprecated positional arguments for `createSourceEventStream()`.