Transactions with GraphQL

Hello! I’m experimenting with enabling transactions in our GraphQL backend.

So far I’m doing something similar to this to set the transaction name to the GraphQL operation: Apollo GraphQL request performance spans - #2 by ldiqual

However, in GraphQL, it’s possible that a single request makes multiple different operations. For example:

query {
  someQuery {
    ...
  }
  someOtherQuery {
     ...
  }
}

Right now, these sub-queries are grouped into a single transaction, and whichever sub-query executes last will overwrite the transaction name set by the previous ones.

What I want is to have different transactions for each of the sub-queries, so that I can see performance of someQuery separately from someOtherQuery. It’d be nice if those sub-queries could be associated with some higher-level transaction as well (e.g. the one created by SentryAsgiMiddleware).

Is something like this possible?

Thanks!