QueryCache not being updated after a successful mutation
I’m posting a new todo to a json placeholder. Now the mutation is successful and server state gets updated with the new todo. But even after invalidating queries in onSettled, refetch returns the old todos.
Please help me with this as I’ve been losing mind over this for past couple of nights

4 Replies
rival-black•3y ago
if you're talking about the json placeholder API (https://jsonplaceholder.typicode.com/): it doesn't really save updates. Where should it store those ?
generous-apricotOP•3y ago
I didn’t know that jsonplacholder api doesn’t save updates. Thanks for the response. You’re a legend.
Also, can you suggest any other api that would work in this case?
deep-jade•3y ago
For example: https://jsonbin.org/
generous-apricotOP•3y ago
Thanks @julien