Fork me on GitHub

Hi, I am wondering if there is any order-of-execution guarantees for the fields inside of a mutation? e.g does the spec propose they execute in the order they are listed in the graphql string? e.g

mutation {
   foo {
-- The order of execution of bar and baz is what I am interested in.


I am aware that root mutation field resolvers must be executed in order, but I am not so sure about the child field resolvers


The reason for this is to express a kind of transactional context in which one can describe a variety of different operation (each a field like bar or baz) so that they can be committed all at once


seems to suggest its not supported. I'll think of another way


The spec is very clear on this: the top level operations run sequentially, but nested fields run with the same semantics as an ordinary query. In addition, in Lacinia, the top-level field resolver exits entirely before nested resolvers are invoked, so you won't be able to implement transaction semantics anyway. It could be done in the Pedestal pipeline instead.