Skip to content

Use fresh state for list item dataloader fibers#5597

Open
rmosolgo wants to merge 2 commits intomasterfrom
list-dataloader-bug
Open

Use fresh state for list item dataloader fibers#5597
rmosolgo wants to merge 2 commits intomasterfrom
list-dataloader-bug

Conversation

@rmosolgo
Copy link
Copy Markdown
Owner

@rmosolgo rmosolgo commented Apr 1, 2026

This runtime_state object was previously being passed into a @dataloader.append_job block so it could be reused. But if that object was reused, it wouldn't be written to Fiber.current[...] and therefore wouldn't be available to Context#current_path. (And if it was available there, it would have been buggy, since the same state was being shared between fibers.)

So pass nil instead of the existing state and allow the method to fall back to a new state object when one isn't pass (as done elsewhere in this file).

Fixes #5595

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.

[graphql-pro] @defer incremental delivery: wrong path when sibling fields exist at same level (GraphQL::Pro::Defer)

1 participant