Customer Self-Service Portal

APM Transactions for GraphQL

I have several services which expose a GraphQL API. In contrast to REST, GraphQL uses one endpoint URL for all requests, e.g.:

POST /graphql
Content-type: application/json

{
"query": "query list_friends($characterName: String!) { character(name: $characterName) { friends { name } } }",
"variables": { "characterName": "Luke Skywalker" }
}

200 OK
Content-type: application/json

{
"data": {
"character": {
"friends": [ { "name": "Leia Organa" }, { "name": "Han Solo " } ]
}
}
}

APM's Transactions tab groups all these requests together -- "POST */graphql" -- which is fairly useless because different requests do very different things.

I attempted to make these transactions unique by having my clients append a query string parameter to the end of the URL that's unique to each query ("?operationName=ShortDescriptionOfWhatItDoes"). But the Transactions tab isn't showing that parameter.

Is there a way to differentiate transactions using either:

  1. A query string parameter, like I've added?
  2. An "operation name" that was part of the POST body?