Skip to content

Mutations that also provide the new state #1169

Answered by phryneas
bvdoord asked this question in Q&A
Discussion options

You must be logged in to vote

Currently mutations can't provide tags. Is this something that's planned, or should I look into something like the optimistic updates?

That wouldn't change anything with your problem I think.
That something "provides a tag" only means that it will be re-fetched if that tag is invalidated - a tag is only an indicator to the system to trigger a re-fetch, not holding any data. Since we assume that sending a mutation actually initiates a change in the database on the server, we will never do that automatically - that always has to be implicit. (If your mutation only fetches data without triggering a change in the backend, it should just not be a mutation, but a query.)

If you want to use th…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@bdugg-91
Comment options

@markerikson
Comment options

Answer selected by bvdoord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants