Skip to content

Resolvers are executed twice #810

@kamek-pf

Description

@kamek-pf

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:

git bisect start
# status: waiting for both good and bad commits
# bad: [a7634d448389698e85b850aebb340db4ed48046b] Relax text upped bounds
git bisect bad a7634d448389698e85b850aebb340db4ed48046b
# status: waiting for good commit(s), bad commit known
# good: [f9684d1451fd4ee3aabdb821424fd352003a3982] publish-release/0.20.1 (#741)
git bisect good f9684d1451fd4ee3aabdb821424fd352003a3982
# good: [76cef01abdc04e52b82aaad49bc7da35a9106ca4] Publish Release 0.23.0 (#772)
git bisect good 76cef01abdc04e52b82aaad49bc7da35a9106ca4
# good: [1d422eb1c2c40fee1148d236fc848144a0b08e11]  refactor: clean up (#785)
git bisect good 1d422eb1c2c40fee1148d236fc848144a0b08e11
# bad: [4b27e0fbc7e31d4febfddd6d2000b744f3cdf2d4] Up to date installation instructions (#796)
git bisect bad 4b27e0fbc7e31d4febfddd6d2000b744f3cdf2d4
# bad: [d4daae8b067baafe001ce58744ec582a6c1db979] Publish Release 0.26.0 (#789)
git bisect bad d4daae8b067baafe001ce58744ec582a6c1db979
# bad: [8c650560ad5c976d8d645212d467ddb9e0ea8503] Publish Release 0.25.0 (#787)
git bisect bad 8c650560ad5c976d8d645212d467ddb9e0ea8503
# bad: [2b2eb76e4cf9e9ed07b8cf65d6987af252aecdee] Named resolvers support batching (#786)
git bisect bad 2b2eb76e4cf9e9ed07b8cf65d6987af252aecdee
# first bad commit: [2b2eb76e4cf9e9ed07b8cf65d6987af252aecdee] Named resolvers support batching (#786)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions