-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters