Replies: 1 comment 10 replies
-
The generated schema object should be cached and not generated on every page call. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the Bug
I am using NextJS API Routes with a graphql server. I use buildSchemaSync ... and it seems that every time NextJS rebuilds the server, when it calls buildSchemaSync to get the schema, slowness increases every time. For example:
First build: 53 ms
Second build: 103ms
Third build: 155ms
Fourth build 202ms
Fifth build: 284ms
Sixth build: 453ms
And keeps increasing until a full 7 seconds and and still rising. I end up having to kill the process and start over. Every new page visited intiial rebuilds the server since using SSR.
To Reproduce
NextJS v12.1.1 using API Routes.
Expected Behavior
Simply rebuild the schema at the 53ms build time every time.
Logs
None
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions