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
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
__selectionsis used for the equatable check, but__selectionslooks 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.
After generating, notice your diff changes from
__mergedSourcesto__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