Repository navigation
docs: backport v17 updates to v16 - #4911
Merged
Merged
Conversation
…aphql#4860) While porting the new API docs to GraphQL-core (the Python port), every `@example` was run as a doctest. That turned up a few examples that don't produce what their `// =>` comments say, and some descriptions that were copied from a different API. This PR fixes them. (cherry picked from commit e35a025)
Backports v17 PR graphql#4907: graphql#4907 Source commit: 106e879 Adapt the example runner to v16's Mocha, TypeScript 4.6, and Babel source loader instead of requiring native Node type stripping and ES modules. Keep assertion tracking, async examples, expected errors, and JSON-aware comparisons. Run examples in npm test and CI, and document annotations. Apply the example corrections for v16 APIs, including schema coordinates, directive extension parsing, scalar imports, and printed input values.
|
@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
Backport runner assertion and module-resolution fixes from v17 commit 1d3056f. Normalize node: builtin imports for Node 12, reject top-level returns, and validate runtime import and re-export bindings before TypeScript can erase unused imports or compile missing exports into unchecked properties.
Backport of graphql#4981. Source commit: 953fc7c Use v16 serialize/parseValue hooks; v16 has no scalar valueToLiteral hook.
Backport of graphql#4981. Source commit: 1150bd8
Backport of graphql#4981. Source commit: c0e421e
Backport of graphql#4981. Source commit: 670fe3d Type the corresponding v16 subscription and coerceInputValue examples; omit v17-only harness and input validation APIs.
Backport of graphql#4981. Source commit: 862e619 Narrow the corresponding v16 AST examples, including getOperationRootType and schema-coordinate parsing. Preserve v16 directive-extension parsing options.
Backport of graphql#4981. Source commit: e47c4a3 Handle the equivalent optional v16 results, and use normalized schema definitions in v16-only required argument/input-field examples.
Backport of graphql#4981. Source commit: 3c12e76 Convert the matching v16 execution and schema-change annotations into executable substring checks as well.
Accept an optional output directory in build:npm, defaulting to npmDist. Resolve repository inputs independently of the caller and generate portable module paths so temporary consumers can invoke the existing build command. Backport of graphql#4981. Source commit: 2d7a065 Adapt the existing v16 Babel build, keeping repository inputs independent of the caller working directory.
Discover examples using TypeScript JSDoc tag positions and Markdown code blocks. Preserve source ranges for diagnostics and use the extractor in the formatter, checking that formatting preserves example boundaries. Backport of graphql#4981. Source commit: 8c2ced7 Add the formatter missing from v16, using Prettier 2 and TypeScript 4.6. Include tooling type checking and format the existing examples; retain documented exceptions for nonstandard GraphQL syntax.
Keep await and yield in their original scope, preserve initializer names and bindings, and avoid collisions with example identifiers. Track every assertion invocation through a dedicated runtime helper and reject annotations that do not run or finish. Backport of graphql#4981. Source commit: 5ce4fc1 Keep the Mocha/CommonJS runner, use the shared source-edit helper, and preserve scope, initializer names, bindings, and every assertion invocation.
Rename the runner and supply its types in the same commit so the migration passes strict type checking. Adopt the shared JSDoc extractor and source-edit helpers, and validate original modules with Node before instrumentation. Backport of graphql#4981. Source commit: 77e5035 Migrate to the shared extractor and strictly checked TypeScript while retaining Mocha/CommonJS execution. Validate uninstrumented modules with the Node 17 experimental VM API.
Invoke build:npm into a temporary project, pack and install the result, and execute examples through native package resolution. Run from the consumer directory, restore the caller during cleanup, and use side-effect entry points so exported then functions are not invoked. Backport of graphql#4981. Source commit: 17e5bcb Build and install the v16 package in a temporary consumer project, run transpiled examples through its CommonJS resolution, and restore the working directory during cleanup.
Require ts or typescript fences for executable examples, keeping GraphQL fences as documentation. Check each uninstrumented example against the installed declarations before execution and document the TypeScript and optional-value conventions. Backport of graphql#4981. Source commit: 77439f5 Type-check original snippets with TypeScript 4.6 against the installed v16 declarations before running them; require TypeScript fences for executable examples.
yaacovCR
added a commit
that referenced
this pull request
Nov 4, 2026
## v16.15.0 (2026-11-04) #### New Feature 🚀 * [#4984](#4984) Backport v17 fixes to v16 ([@yaacovCR](https://github.com/yaacovCR)) #### Bug Fix 🐞 * [#4900](#4900) Backport OverlappingFieldsCanMerge changes (v16) ([@yaacovCR](https://github.com/yaacovCR)) * [#4909](#4909) Backport maxLexicalTokens, maxComments, maxSourceLength parser options (v16) ([@yaacovCR](https://github.com/yaacovCR)) * [#4917](#4917) fix: bound shared fragment traversal in introspection validation (v16) ([@yaacovCR](https://github.com/yaacovCR)) #### Docs 📝 * [#4911](#4911) docs: backport v17 updates to v16 ([@yaacovCR](https://github.com/yaacovCR)) #### Internal 🏠 * [#4826](#4826) chore(release): protect latest release channels from v16 ([@yaacovCR](https://github.com/yaacovCR)) #### Committers: 1 * Yaacov Rydzinski ([@yaacovCR](https://github.com/yaacovCR))
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.