Skip to content

Commit

Permalink
add draft
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Sep 23, 2024
1 parent 7875552 commit 87fe01b
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions website/docs/tutorials/whats-new-in-graphql-js-v17.md
Original file line number Diff line number Diff line change
@@ -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()`.

0 comments on commit 87fe01b

Please sign in to comment.