Closed ebayasgalan closed 1 year ago
The code on github: nextjs-app
^This is the error that keeps on creeping up after a few successful fetch. I've tried "npm ls graphql" and made sure there's only one graphql package installed in node_modules. Also added "resolutions" into package.json. But the issue persists, is there anyone else having this issue? I've tried a simple schema for graphql-yoga-server and found out it works fine. It seems like the bug is stemming from keystone's graphql schema.
To replicate the error: Create a route handler using next.js pages or app dir - /api/graphql. Refresh the page a few times and the bug will come out.
Problem: When deploying nextjs and keystone to Vercel, the production is not creating /api/graphql endpoint because graph-yoga config schema is not accepting keystone's generated schema.
Everything works as expected on development environment. The bug happens only on deployment.
The error on the console:
I'm using: nextjs v13.4.4 keystone6 node v18.16.0