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

Prevent fragments from impacting @client fields #4483

Closed
wants to merge 1 commit into from

Commits on Feb 22, 2019

  1. Prevent fragments from impacting @client fields

    In the `LocalState.resolveSelectionSet` method, we’re adding the
    `rootValue` to the `resultsToMerge` array multiple times. This
    is causing issues when a `@client` query, that also includes
    fragments,  is run. If the `@client` field is configured to use a
    local resolver, when the result is calculated and returned from
    the local resolver, the fragment results are then merged with the
    result, along with another copy of the `rootValue`. The second
    copy of the `rootValue` overrides the value received from the
    `@client` local resolver.
    
    This commit moves the merging of the `rootValue` up a level, so
    it only happens once, and doesn’t override local resolver results.
    hwillson committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    ec2e7a8 View commit details
    Browse the repository at this point in the history