Transactions in GraphQL

I’ve got two concerns about usage:

  1. is it easy to use the @transaction that sits outside the query/mutation block using variables. E.g. we’d need this to work nicely mutation myMut($txn: Int, ...) @transaction(id: $txn) { ... } for it to be useable from the client
  2. it’s not easy to get at graphql extensions in things like Apollo Client (e.g., see here), so that would make it hard to get the transaction id back out of the request that opens up the transaction.

Before going ahead we’d need to solve both those problems, so that it’s easy to use. Or at least have nice docs to show how to get the extensions in clients.

1 Like