Skip to content

Move Lazy resolution into Dataloader #5314

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Apr 2, 2025

This is a moonshot but I want to see if the runtime code can be simplified by rebuilding lazy_resolve on top of GraphQL::Dataloader. Some hard requirements:

  • No (or minimal...) performance hit for adopting Dataloader (not in speed or memory usage)
  • Behavioral parity -- same batching performance and behavior
  • Swappable per-query, so that you can try the new way or the old way while the app is running. This is essential for adoption: you have to be able to fall back to the old way if something goes wrong.

The reason I want to do this is because I want more flexibility in how GraphQL execution is started and stopped, so that I could reasonably support Ruby's lazy enumerators (#4907) and partial query execution (#5183).


My todos:

  • Make sure all existing legacy_sync_lazy(true) can be replaced with Dataloader
  • Run builds with both legacy and Dataloader implementations
  • Dataloader currently changes response key order. Have to fix that Dataloaders are changing the response order #4252
    ...
  • Revisit API and write docs

Sorry, something went wrong.

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

Successfully merging this pull request may close these issues.

None yet

1 participant