You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I switched from Vercel DB to a local PostgreSQL database like this:
import{drizzle}from"drizzle-orm/node-postgres";importpgfrom"pg";constpool=newpg.Pool({host: process.env.POSTGRES_HOST!,port: parseInt(process.env.POSTGRES_PORT!),user: process.env.POSTGRES_USER!,password: process.env.POSTGRES_PASSWORD!,database: process.env.POSTGRES_DATABASE!,});constdb=drizzle(pool,{ schema });// same below
However, after making this change, the server crashes with a JavaScript heap out of memory error whenever I send a query request. After debugging, I found out that introspection queries (as well as other POST requests) hang forever in yoga GraphiQL.
So I added the useDisableIntrospection() plugin from @graphql-yoga/plugin-disable-introspection, and that resolved the issue.
I'm figuring out why it happens because I want to keep using yoga, but help needed please.
Thank you for creating the issue./
I guess the CodeSandbox you shared doesn't include Remix setup, so could you update it so we can reproduce the issue.
Describe the bug
I've been using graphql-yoga with Remix, Drizzle, and Vercel Postgres, and my initial setup looked like this:
Recently, I switched from Vercel DB to a local PostgreSQL database like this:
However, after making this change, the server crashes with a JavaScript heap out of memory error whenever I send a query request. After debugging, I found out that introspection queries (as well as other POST requests) hang forever in yoga GraphiQL.
So I added the
useDisableIntrospection()
plugin from@graphql-yoga/plugin-disable-introspection
, and that resolved the issue.I'm figuring out why it happens because I want to keep using yoga, but help needed please.
Your Example Website or App
https://codesandbox.io/p/devbox/holy-rain-k8dd7t?file=%2Fsrc%2Fapi.graphql.ts%3A19%2C4
Steps to Reproduce the Bug or Issue
Expected behavior
The introspection should work well without memory issue.
Screenshots or Videos
No response
Platform
@graphql-yoga/*
version(s): 5.10.9Additional context
No response
The text was updated successfully, but these errors were encountered: