graphql-ruby icon indicating copy to clipboard operation
graphql-ruby copied to clipboard

Spike attempting to use Fiber#transfer instead of yield / resume

Open dbackeus opened this issue 3 years ago • 0 comments

As requested in https://github.com/rmosolgo/graphql-ruby/issues/4003 here is the diff for the spike I made for Fiber#transfer support.

I was mistaken in the issue to say that async dataloader specs were passing for both fiber_scheduler and async. In fact there are 3 failures when using async still. This may or may not be due to the implementation of Async::Scheduler itself being incomplete. According to Bruno the only gem which covers 100% of the fiber scheduler spec is his own fiber_sheduler gem.

As you can see it's an extremely minimal diff. A hunch as to why a lot of specs outside of async_dataloader_spec.rb are failing is that the @parent_fiber idea is too naive and needs some more sophisticated approach. I had worked neither with the GraphQL gem nor Fiber's before attempting this so felt lost pretty quickly 😅

dbackeus avatar Mar 24 '22 14:03 dbackeus