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

Rewrite dataloader to use Fiber#transfer #4625

Merged
merged 14 commits into from
Dec 11, 2023
Merged

Rewrite dataloader to use Fiber#transfer #4625

merged 14 commits into from
Dec 11, 2023

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Sep 7, 2023

I'm trying to find a way to make GraphQL::Dataloader work with non-blocking fibers that use .transfer. I tried an incremental approach in #4322 , but it's not really working -- I think I need to rethink how these parts fit together.

This is coming along nicely -- it's actually much simpler -- but it doesn't support blocking: false yet.

@Alexxfrolov
Copy link

Hi, do u have any news on this PR ? Are u gonna merge it ?

@fazo96
Copy link

fazo96 commented Oct 30, 2023

We are also looking forward to turning on non-blocking fibers at Flexhire 🙂

@rmosolgo rmosolgo added this to the 2.1.8 milestone Dec 11, 2023
@rmosolgo
Copy link
Owner Author

The reason I paused on this is because I really wanted to get it working with the async gem. But I couldn't :S In any case, I think the cleaned-up algorithm is an improvement, so I'll merge it.

@rmosolgo
Copy link
Owner Author

rmosolgo commented Dec 28, 2023

This change was rolled back in #4752 because Fiber#transfer has unpredictable control flow. See:

But, GraphQL-Ruby 2.2.3 will have a much better AsyncDataloader, built on the Async gem 👌

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.

3 participants