There is a constant problem with optimistic responses when trying to delete optimistic resource before actual response comes back.
When artificially created id is added to optimistic response (which is common practise), then deleting such object will fail, since id is unknown to backend.
Suggested solution
I'd like to see sometime similar to solutions to this floating on the Internet (such as this) to be officially incorporated into apollo-client.
This would save effort to manually add linked solution to every optimistic response and unify approach to this problem.
Problem
There is a constant problem with optimistic responses when trying to delete optimistic resource before actual response comes back.
When artificially created
id
is added to optimistic response (which is common practise), then deleting such object will fail, sinceid
is unknown to backend.Suggested solution
I'd like to see sometime similar to solutions to this floating on the Internet (such as this) to be officially incorporated into apollo-client.
This would save effort to manually add linked solution to every optimistic response and unify approach to this problem.