#QueryCache not being updated after a successful mutation

4 messages · Page 1 of 1 (latest)

lone iris
#

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

maiden river
lone iris
#

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?

naive sequoia