mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #145] Issue using @apollo/client-integration-nextjs #34
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#34
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DenyVeyten on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/145
... missing ServerInsertedHTMLContext export in
vinext/dist/shims/navigation.js
is a hardcoded omission in the vinext library itself. Your application relies on @apollo/client-integration-nextjs, which strictly requires this Next.js context to be available during SSR. Because vinext acts as a drop-in replacement for Next.js, it needs to provide this shim.
Generated patch:
@xXMrNidaXx commented on GitHub (Feb 28, 2026):
Analysis
The root cause is that
@apollo/client-integration-nextjsimportsServerInsertedHTMLContextfromnext/navigation, which vinext's navigation shim doesn't export.The LLM-generated patch is directionally correct but has edge cases. Here's a cleaner approach:
Option 1: Proper Context Export
Instead of string replacement, export a no-op context that satisfies the Apollo type:
Option 2: Apollo-specific workaround (user-land)
If you need it working today without waiting for a vinext release:
Import this once in your root layout before any Apollo imports.
Recommendation
This should be fixed in vinext core since other SSR-aware libraries (React Query, etc.) may also depend on this context. The export list in the navigation shim should mirror Next.js's exports for drop-in compatibility.