Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy loading schema #1953

Open
1 of 3 tasks
theodesp opened this issue Jun 12, 2022 · 0 comments
Open
1 of 3 tasks

Lazy loading schema #1953

theodesp opened this issue Jun 12, 2022 · 0 comments

Comments

@theodesp
Copy link

theodesp commented Jun 12, 2022

Feature Request Type

  • Core functionality
  • Alteration (enhancement/optimization) of existing feature(s)
  • New behavior

Description

It would be useful for people to be able to load schemas on the fly (lazily at runtime) instead of binding them in a view. This could be used for dynamic graphql servers, when you need to serve a different schema per user context.

express-graphql does this by allowing the schema to be resolved lazily.
Similar to this example:
graphql/express-graphql#791
Note that in this case the options: Options is either an Object or a promise returning an object.

Apollo does not offer this by default, only by using a dangerous hack (which unfortunately is used in production in a few places that I've seen):

apollographql/apollo-server#2010 (comment)

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant