-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Resolvers are executed twice #810
Comments
@nalchevanidze sorry to bother you, I'd like to take a stab at this as it is blocking some of my own work. Do you have any idea what's going on, or any advice for me ? |
hi @kamek-pf ,sorry i had/have a lot of to do. i suspect introducing a new typed resolver model messes up the resolver calls. i will try to look on it and will try to fix it |
@kamek-pf my suspicion was true. this should fix it, i also added test to avoid this happening in future. |
Can confirm #812 fixes the issue for both mutation and queries. |
I recently came to realize Morpheus is executing resolvers twice for a single query.
This issue is similar to #806, but more general as it applies to all types of resolvers (queries, mutations and subscriptions).
I ran
git bisect
and the issue was introduced in #786.To figure that out, I just added a
print "running resolver"
to the query resolver in the Mythology example.If the log shows up more than once, you've reproduced the bug.
This method only proves the issue happens with query resolvers, but I've observed the same thing in my code base for mutations, and #806 reports the same behavior for subscriptions. It's probably fair to assume the root cause is the same in all 3 cases and that the bug was introduced by the same commit.
Here's the bisect log just in case:
The text was updated successfully, but these errors were encountered: