Updates from mutation responses with trpc?
I'm trying to automatically update a list query after updating the list with a mutation. The tanstack query docs show its pretty easy to do with straight up tanstack query: https://tanstack.com/query/v4/docs/react/guides/updates-from-mutation-responses
However, with the t3 setup and trpc wrapper, I'm struggling to figure out how to do this.
If I try to add a querykey like
However, with the t3 setup and trpc wrapper, I'm struggling to figure out how to do this.
If I try to add a querykey like
list: publicProcedure.query("items", async () => {, I get an error saying that query() is only expecting 1 argument, not 2.When dealing with mutations that update objects on the server, it's common for the new object to be automatically returned in the response of the mutation. Instead of refetching any queries for that item and wasting a network call for data we already have, we can take advantage of the object returned by the mutation function and update the exis...

