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

fix: changing operation in $rootOperation #3

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

olivierwilkinson
Copy link
Owner

In $rootOperation the only way to change the operation type is to use the previous client; in $allNestedOperations we are able to manipulate the args that are passed to the query, but in $rootOperation there is no API for switching the operation type of the query function.

Currently if the $rootOperation does not call the query function then the query hangs, this is because we are awaiting the query function in the $allOperations hook generated by withNestedOperations.

Replace the execution of the $rootOperation with a straight call to $rootOperation as we don't need to track any aspect of its execution.

In $rootOperation the only way to change the operation type is to use
the previous client; in $allNestedOperations we are able to manipulate
the args that are passed to the query, but in $rootOperation there is no
API for switching the operation type of the query function.

Currently if the $rootOperation does not call the query function then
the query hangs, this is because we are awaiting the query function in
the $allOperations hook generated by withNestedOperations.

Replace the execution of the $rootOperation with a straight call to
$rootOperation as we don't need to track any aspect of its execution.
@olivierwilkinson olivierwilkinson merged commit 70e1ef9 into main Nov 2, 2023
2 checks passed
@olivierwilkinson olivierwilkinson deleted the fix-changing-root-operation branch November 2, 2023 13:24
Copy link

github-actions bot commented Nov 2, 2023

🎉 This PR is included in version 1.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant