Skip to content
Discussion options

You must be logged in to vote

Will this exist in v4?

no, it won't. I don't think it would solve the underlying problem, which is:

  • one mutation starts, locks queries
  • a second mutations starts
  • first mutation finishes, unlocks and refetches

unless the second mutations double-locks, we would still invalidate.

basically, we have been doing this in user-land lately:

export const useTrackParallelMutations = () => {
    const mutationNumber = React.useRef(0)

    return {
        startOne: () => {
            mutationNumber.current += 1
        },
        endOne: () => {
            if (mutationNumber.current > 0) {
                mutationNumber.current -= 1
            }
        },
        allEnded: () => mutationNumber…

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@shamxeed
Comment options

@TkDodo
Comment options

@shamxeed
Comment options

@jzxchiang1
Comment options

@Steffen-Samseth
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@VanTanev
Comment options

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