Replies: 1 comment
-
I haven't found any way to achieve it so I just implemented a dedicated data layer aka cache/store which I'm using to add/remove optimistic models etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi guys, I have a message model that has attachments. The main feature of it that the every attachment is loading immediatelly after it had been added to the message. So it means I could have 10 attachments and they are sequentually loading in the runtime. At that moment I what to be able to hit enter and optimistically add the message model to the cache. However, as the attachments are still uploading - I can send the real
createMessage
mutation to the server only when all the attachments will be uploadded and after that I expect the replacement of the optimistic message model by the real oneI'm wondering how to do that?
I have read almost all the topics in discussions regarding the optimistic stuff and saw that some custom exchange could help it. However, if I understand correctly, I can prevent the mutation from sending to the server but how can I continue this optimistic sending to the server after all the attachments be ready to be able to get the appropriate result and the most important - to get the URQL auto replacement the optimistic response by the real one?
Thanks for any help!
The structure of the message is:
Thank you for any help!
Beta Was this translation helpful? Give feedback.
All reactions