Fork me on GitHub

in lacinia, is there a way to pass on the (possibly updated context) between mutations that are being resolved in sequence (e.g. the updated database value from the previous mutation)? like resolve/with-context but then between top-level resolvers


I'm afraid not. It would take add some significant complexity to support that, and I'm not sure it's a good idea.


That is, if it could be done, it would create a special case that would likely be abused in some way, causing further headaches.


I'm afraid you'll probably need to stuff an atom into the context before execution, to communicate information from the first mutation to the later ones.


Ok, makes sense. In this case I can use the DB connection instead of the calculated db at the beginning of the request.


For queries it is important that 1 request shows a consistent view of the database, but for mutations that is already not the case since they execute transactions and return query results after the transaction