reactive-graphql
reactive-graphql copied to clipboard
Add option to not emit changes if nothing changes
trafficstars
Currently, if the field resolvers don't use a sophisticated distinctUntilChanged on their value or if they don't work with immutable data structures we will emit too many change events, because if something deep in the tree changes we will have combineLatest fire too often.
We are in a position to mitigate this problem: We have all the type information from the schema, so we can just traverse the schema and whenever we find a primitive we can wrap it with distinctUntilChanged.
I would love to hide this behavior behind a flag, as the comparison might have more toll on the performance then emitting too many events