fix(nuxt): support Nuxt 5 - #675
Open
onmax wants to merge 3 commits into
Open
Conversation
👷 Deploy request for apollo-module pending review.Visit the deploys page to approve it
|
onmax
marked this pull request as ready for review
July 24, 2026 08:35
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.
🔗 Linked issue
N/A — this is a compatibility fix for Nuxt 5 consumers.
❓ Type of change
📚 Description
This declares Nuxt 5 compatibility and makes GraphQL Vite plugin registration idempotent by plugin name.
Nuxt can extend separate client and SSR Vite configs over a shared plugin array, and another module or the consumer may already provide
@rollup/plugin-graphql. Appending anothergraphqlplugin makes the second transform parse the JavaScript emitted by the first as GraphQL. The module now reuses one plugin instance and only adds it when nographqlplugin is already registered.The playground preloads the real GraphQL plugin as regression coverage. Before the name-based guard,
pnpm dev:buildfails onplayground/queries/launches.gqlwithSyntax Error: Unexpected Name "var"; with the guard, both client and SSR builds pass.✅ Checks
pnpm lintpnpm buildpnpm dev:build(Nuxt 4.0.2 / Nitro 2.12.4)nuxt-nightly@5.0.0-29762631.396a4ae3,@nuxt/kit-nightly@5.0.0-29762631.396a4ae3, Nitro3.0.260610-beta, Vite 8.2.1, a real.gqlimport, and an existinggraphqlplugin