Skip to content

Add GraphQL v17 support#104

Merged
ivome merged 5 commits into
masterfrom
graphql-17
Jul 23, 2026
Merged

Add GraphQL v17 support#104
ivome merged 5 commits into
masterfrom
graphql-17

Conversation

@ivome

@ivome ivome commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds GraphQL 17 support and simplifies hybrid CJS/ESM packaging by importing all graphql utilities from the package root.

Addresses #103

  • GraphQL 17 compatibility: Handle getVariableValues() returning { variableValues } instead of { coerced }, use string-literal AST kind checks (GraphQL 17 makes Kind type-only), and relax error-message assertions for GraphQL 17's more verbose argument errors.
  • Single-instance safety: Drop the deep graphql/execution/values import and all sed-based import rewriting in the hybrid-module scripts. Every graphql import now goes through the bare graphql specifier, which avoids mixing ESM/CJS copies of graphql in the same realm.
  • Version support changes:
    • peerDependencies.graphql: ^16.6.0 || ^17.0.0 (drops 15.x and 16.0–16.5; getVariableValues/getArgumentValues became root exports in 16.6)
    • CI matrix: graphql ~16.6, ~16, ~17.0; Node 20 removed from CI
  • Build: Add "DOM" to tsconfig.json lib so GraphQL 17's type definitions compile under TypeScript 4.4 (for AbortSignal/AbortController references).

Breaking changes

  • Minimum supported graphql version is now 16.6.0 (was 15.0.0).
  • Node 20 is no longer tested in CI.

Test plan

  • yarn test passes on graphql 16.6.0, 16.14.2, and 17.0.2 (CJS + ESM)
  • New test: @include(if: $show) with explicit variable values (covers variable → directive coercion across graphql versions)
  • Built dist/ artifacts contain only bare graphql imports (no deep imports, no .mjs/.js rewrites)
  • Isolated consumer smoke test against published dist/ on graphql 17 (no realm crash)

@ivome
ivome marked this pull request as ready for review July 23, 2026 01:17
@ivome
ivome merged commit 9fa76f2 into master Jul 23, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant