Thank you for the amazing work. I really liked the idea and implementation.
Can I question you something?
Let's say there is a chat with a list of messages.
The user edited one of them by setTitle messages(id: 1, msg: "new content").
If I understood correctly, then we are doing liveQueryStore.invalidate ('Query.messages').
But this will re-request and re-render all the messages again, right? Or is there a hope that React will update only part of it thanks to the Virtual DOM? And if the rendering is more complex, where there is a lot of logic and it is expensive to run every time?
Updates can be sent in patches. Optimizations must be done in user-land as this is not a concern of this library. However, clients like relay already do that optimization for your. You can check out the relay and apollo example over here and observe re-renders with the react dev tools! github.com/n1ru4l/graphql-live-que... and
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Laurin!
Thank you for the amazing work. I really liked the idea and implementation.
Can I question you something?
Let's say there is a chat with a list of messages.
The user edited one of them by
setTitle messages(id: 1, msg: "new content")
.If I understood correctly, then we are doing
liveQueryStore.invalidate ('Query.messages')
.But this will re-request and re-render all the messages again, right? Or is there a hope that React will update only part of it thanks to the Virtual DOM? And if the rendering is more complex, where there is a lot of logic and it is expensive to run every time?
And what about multiple root queries?
‘Query { messages, users, comments, settings, workspaces, permissions }’
Updates can be sent in patches. Optimizations must be done in user-land as this is not a concern of this library. However, clients like relay already do that optimization for your. You can check out the relay and apollo example over here and observe re-renders with the react dev tools! github.com/n1ru4l/graphql-live-que... and