graphql-flutter icon indicating copy to clipboard operation
graphql-flutter copied to clipboard

How does ResultsAccumulator handle uniqueness?

Open cinjon opened this issue 1 year ago • 2 comments

I'm finding that ResultsAccumulator is accumulating everything. How do I get it to not do that? Can I change the unique definition? See below for an example where all of these null values are being saved.

results [{messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}, {messageAlerts: null}]

cinjon avatar May 29 '23 22:05 cinjon

Mh this is a good question, I should find some time at the end of the month to look inside it

vincenzopalazzo avatar Jun 03 '23 08:06 vincenzopalazzo

I looked into the code after posting this, and it is just appending to a list after checking for contains. It would require having a smarter contains to fix this. For my needs, I inherited and changed the appendUnique function to work with my specific data.

cinjon avatar Jun 04 '23 11:06 cinjon