GraphQL Instance Conflict in Next.js App Router with GraphQL Yoga #3870
-
Environment
SetupI'm using Next.js App Router with GraphQL Yoga to create a GraphQL API endpoint. The schema is generated using Drizzle GraphQL from a MySQL database. On the frontend, I'm using Apollo Client to make GraphQL queries to this endpoint. API Route Setup (
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Please create an issue with a minimal isolated reproduction on CodeSandbox. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Moved the graphql backend to a separate service outside of next.js and this solved the issue. EDIT: Still not sure why/how to solve the issue in Next without the need of another service. |
Beta Was this translation helpful? Give feedback.
Moved the graphql backend to a separate service outside of next.js and this solved the issue.
Seems that the shared backend/frontend codebase of next was causing the issue.
EDIT: Still not sure why/how to solve the issue in Next without the need of another service.