Skip to content

Upgrade @urql/core to v6 in vscode-graphql-execution#4342

Merged
trevor-scheer merged 1 commit into
mainfrom
trevor/upgrade-urql
Jun 7, 2026
Merged

Upgrade @urql/core to v6 in vscode-graphql-execution#4342
trevor-scheer merged 1 commit into
mainfrom
trevor/upgrade-urql

Conversation

@trevor-scheer

Copy link
Copy Markdown
Contributor

Summary

Upgrades @urql/core from 2.6.1 to 6.0.1 in the vscode-graphql-execution extension. Because v6 no longer depends on graphql (it uses @0no-co/graphql.web), it stops deep-importing graphql/*.mjs, which lets us delete the esbuild resolver shim that worked around graphql 17's exports map. The major jump also required adapting to a handful of removed APIs.

Changes

  • Bump @urql/core to ^6.0.1.
  • Remove the graphql-mjs-resolver esbuild plugin.
  • Replace the removed defaultExchanges with explicit cacheExchange/fetchExchange, splicing in subscriptionExchange for subscriptions.
  • Switch gql from graphql-tag to @urql/core and drop the graphql-tag dependency.
  • Normalize the forwarded subscription query to a string for graphql-ws.

Validation Steps

  • In a project with a configured GraphQL endpoint, run a query inline and confirm results render.
  • Run a mutation inline and confirm results render.
  • Run a subscription against a graphql-ws endpoint and confirm updates stream in.

v6 drops its `graphql` dependency in favor of `@0no-co/graphql.web`, so it no
longer deep-imports `graphql/*.mjs`. That removes the need for the esbuild
resolver shim that redirected those paths to their `.js` siblings.

- `defaultExchanges` was removed; build the chain explicitly with
  `cacheExchange`/`fetchExchange` plus `subscriptionExchange`.
- Use `@urql/core`'s `gql` instead of `graphql-tag` so document types match
  urql's input; drop the now-unused `graphql-tag` dependency.
- Normalize the forwarded subscription `query` to a string for `graphql-ws`.
@changeset-bot

changeset-bot Bot commented Jun 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ee4407e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
vscode-graphql-execution Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@trevor-scheer trevor-scheer merged commit b4c7ae5 into main Jun 7, 2026
13 checks passed
@trevor-scheer trevor-scheer deleted the trevor/upgrade-urql branch June 7, 2026 01:56
trevor-scheer pushed a commit that referenced this pull request Jun 11, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## graphiql@5.2.4

### Patch Changes

- [#4346](#4346)
[`0f5a2a0`](0f5a2a0)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Release a
patch version of the packages served from esm.sh in the [GraphiQL CDN
example](examples/graphiql-cdn/index.html) to trigger a rebuild on
esm.sh now that a longstanding esm.sh issue has been fixed.

- Updated dependencies
[[`0f5a2a0`](0f5a2a0)]:
  - @graphiql/react@0.37.7
## @graphiql/plugin-explorer@5.1.3

### Patch Changes

- [#4346](#4346)
[`0f5a2a0`](0f5a2a0)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Release a
patch version of the packages served from esm.sh in the [GraphiQL CDN
example](examples/graphiql-cdn/index.html) to trigger a rebuild on
esm.sh now that a longstanding esm.sh issue has been fixed.
## @graphiql/react@0.37.7

### Patch Changes

- [#4346](#4346)
[`0f5a2a0`](0f5a2a0)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Release a
patch version of the packages served from esm.sh in the [GraphiQL CDN
example](examples/graphiql-cdn/index.html) to trigger a rebuild on
esm.sh now that a longstanding esm.sh issue has been fixed.

- Updated dependencies
[[`0f5a2a0`](0f5a2a0)]:
  - @graphiql/toolkit@0.12.1
## @graphiql/toolkit@0.12.1

### Patch Changes

- [#4346](#4346)
[`0f5a2a0`](0f5a2a0)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Release a
patch version of the packages served from esm.sh in the [GraphiQL CDN
example](examples/graphiql-cdn/index.html) to trigger a rebuild on
esm.sh now that a longstanding esm.sh issue has been fixed.
## vscode-graphql-execution@0.3.7

### Patch Changes

- [#4342](#4342)
[`b4c7ae5`](b4c7ae5)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Upgrade
`@urql/core` to v6 and remove the esbuild shim that redirected `graphql`
`.mjs` imports.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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