Graphiti icon indicating copy to clipboard operation
Graphiti copied to clipboard

Mutations should run in SERIES not parallel

Open cshadek opened this issue 4 years ago • 2 comments

I'm running Graphiti 0.26.0 and noticed that Mutations seem to be running in parallel when they should be running in series.

A simple example would be:

mutation Test {
    addLike(input: {id: 1}) {
       ....
    }
    removeLike(input: {id: 1} ) {
       ....
    }
    addLike2: addLike(input: {id: 1} ) {
       ....
    }
}

Ideally this should run the top fields in order, per the spec, but it doesn't and it seems to run them in parallel, leading to potential race conditions and unintended results.

cshadek avatar Jul 16 '21 15:07 cshadek

@paulofaria do you have suggestions on the best way to fix this?

cshadek avatar Jul 16 '21 15:07 cshadek

This is the part of the spec that specifies that mutations should run in series.

http://spec.graphql.org/June2018/#sec-Mutation

cshadek avatar Jul 16 '21 21:07 cshadek