-
Notifications
You must be signed in to change notification settings - Fork 749
Closed
apollographql/apollo-ios-dev
#832Labels
Description
Summary
When a query has a named fragment and an inline fragment, the new equatable logic seems to break. Trying to track this down, and it looks like the error is that __selections is used for the equatable check, but __selections looks vastly different after adding in an additional inlineFragment.
Version
1.5.2
Steps to reproduce the behavior
Query: https://github.com/apollographql/apollo-ios-dev/blob/main/Sources/StarWarsAPI/starwars-graphql/HeroDetails.graphql + add in an inline fragment of your choice.
query HeroDetailsWithFragment($episode: Episode) {
hero(episode: $episode) {
...HeroDetails
... on Human {
mass
}
}
}
After generating, notice your diff changes from __mergedSources to __selections, where the new inline fragment's field is the only selection.
Now, when creating this object, the only field used for hashable/equatable is the field on the inlineFragment.
Logs
Anything else?
No response