Apollo-server-lambda GraphQL Function timing out on 90% of the requests when the schema is large

Website name: mellow-nasturtium-e499f1
domain: app.vlearned.com
function: app.vlearned.com/.netlify/functions/graphql

Currently, i have deployed the function with only a small schema but once I load the full schema, Apollo studio can’t even open due to the initial request timing out. It opens in development (netlify dev) but all the introspection queries timeout and only a few go through. THe introspection queries in Apollo studio during normal development without the function return with a size of about 354kb, but in apollo studio for the function, the size is 5,5MB and takes forever to load over the network, causing timeouts.

Sounds like you know the cause of the issue. Could you let us know what do you need our help with?

I am actually trying to find out if this is normal behavior. We’re planning on making a switch from docker to Netlify. We want to understand if there are any bottlenecks and how to navigate them. If a function struggles with a large graphql schema + heavy resolvers while a docker setup works flawless, I just need to understand if there’s something i’m doing wrong and possible solutions.

That makes sense. Could you give us a reproduction repo to test? We can investigate that and let you know if it’s expected or if there is a scope for optimization.

Let me create a reproduction repo to have this investigated ASAP. Thanks