Closed rpekarek-tc closed 9 months ago
Update: This appears to be working according to design, as specified here: https://github.com/zino-hofmann/graphql-flutter/blob/41cd27ea2c849dd286bf328793c9679472a0e483/packages/graphql/README.md?plain=1#L574-L587
I have a complex data structure being returned from our CMS via graphql. Inside this structure there is a list of items each with a nested sublist. Two of these items are exactly the same, with the exception of the contents of their sublist. When I execute my query in the apollo graphQL playground, my data is returned as expected (two items returned, each with different sublists).
However when I run the same query with the
graphql
package in Flutter, the latter of the two items is returned twice. I've verified this by reversing the order they are listed in our CMS. Whichever one is last is returned twice, and the first is not returned at all. See query and return values below:query:
result:
Expected behavior The unique sublists should be returned on each item, rather than two duplicate items
device / execution context Tested on an iOS simulator, bug reported on a physical iOS device.
additional context We use Contentful for content management, this issue is not present on our adjacent web app using the same query
additional notes This seems like an over-optimization issue. Is
id
by chance a keyword that would cause these two items to return the same json? When I change the id of one of the two items, they return as expected