graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.77k stars 735 forks source link

Handling very large introspection query #1316

Open lastmjs opened 3 years ago

lastmjs commented 3 years ago

This issue pertains to the following package(s):

What is the expected behavior?

I'm wondering if there is some way for the playground to obtain the results of the introspection query with multiple http requests, or streamed somehow.

What is the actual behavior?

The playground uses one http request to ask for the introspection query result, which in my local environment works fine. I think the total size of my introspection query result is about 1.7 mb. The problem is that I'm using AWS lambda behind a load balancer, and the load balancer has a 1mb limit. I don't think I can get around the limit while still using the load balancer, and thus I can't get the results of the introspection query into the playground.

I need some way of delivering a large introspection query result to the playground outside of one http request/response. Is this possible?

acao commented 3 years ago

one way would be to serve up the schema SDL at another route, and request that? potentially you could gzip it over the wire as well?

then in your react app, you parse the schema and pass the generated GraphQLSchema primitive as a prop. this would work with either our project GraphiQL or this project of ours Playground, but you would need a custom react app