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 runtime error when aggregating results with error-containing left-value #449

Closed
wants to merge 2 commits into from

Conversation

namenu
Copy link
Contributor

@namenu namenu commented Jul 21, 2023

The query below causes an infinite wait when executed.

query HangingQuery($id: ID!) {
  node(id: $id) {
    ... on Post {
      ... on Post {
        author {
          alwaysError
        }
      }
      author {
        name
      }
    }
  }
}

On the other hand, if you reverse the order of the field declarations, it will not.

query HangingQuery($id: ID!) {
  node(id: $id) {
    ... on Post {
      author {
        name
      }
      ... on Post {      # change the order
        author {
          alwaysError
        }
      }
    }
  }
}

It's worth noting that the fragment must be used to reproduce the error.

I guess in the process of doing merge-selected-values,
even though the left-value value is nil (which is resolved by alwaysError),
update to nil is called (which cause runtime error).

This PR fixes this issue.

@CLAassistant
Copy link

CLAassistant commented Jul 21, 2023

CLA assistant check
All committers have signed the CLA.

@hlship hlship added the bug label Feb 2, 2024
@hlship hlship added this to the 1.2.2 milestone Feb 2, 2024
@hlship
Copy link
Member

hlship commented Feb 2, 2024

I'm sorry that I haven't kept track of this. I'd like to create a 1.2.2 release, but looks like your patch will need to be updated. If you can put that together, I'd be happy to merge.

@namenu namenu marked this pull request as draft February 3, 2024 07:44
@namenu namenu closed this Feb 3, 2024
@hlship hlship removed this from the 1.2.2 milestone Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants