-
Let's say I have an query Then I have the mutations After executing Similarly, after executing The readme states,
This library is definitely a way easier developer experience, but if it comes at the cost of sending way more data than necessary in these common cases, I may prefer using regular subscriptions. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@tetchel This is solved via the https://github.com/n1ru4l/graphql-live-query/tree/main/packages/graphql-live-query-patch-jsondiffpatch middleware that ensures only patches are sent over the wire. The trade-off here is that the server always stores the last execution result and diffs it against the new execution result. Hence there is more overhead going on on the server, but in contrast, the client is free of subscription update logic. |
Beta Was this translation helpful? Give feedback.
@tetchel This is solved via the https://github.com/n1ru4l/graphql-live-query/tree/main/packages/graphql-live-query-patch-jsondiffpatch middleware that ensures only patches are sent over the wire.
The trade-off here is that the server always stores the last execution result and diffs it against the new execution result. Hence there is more overhead going on on the server, but in contrast, the client is free of subscription update logic.