Skip to content

Each GraphQL request to a Next.js app is named by its operation - #120

Merged
paales merged 1 commit into
mainfrom
graphql-body
Dec 2, 2026
Merged

paales merged 1 commit into
mainfrom
graphql-body

Conversation

@paales

@paales paales commented Dec 2, 2026

Copy link
Copy Markdown
Member

Written by 🤖:

  • The SDK reads the GraphQL operation of each request from the URL (operationName, query) or from the body as the server receives it: JSON, the first operation of a batch, or a document of application/graphql. A body above 1 MB keeps its route as name.
  • The server spans of the request take graphql.operation.name and graphql.operation.type. The OTel Collector names the request, such as POST graphql CategoryPage, and leaves out a subscription.
  • Before, only a GraphQL server that writes its own spans, such as the Hive Gateway, gave its operation. The /api/graphql of the BSC storefront stayed POST /api/graphql.
  • Checked with the bundle, a Node.js server and the OTel Collector 0.146.0 with the live config: each case above, a page with ?query=shoes keeps its route, and the handler reads the full body.

@paales
paales merged commit 9575c2a into main Dec 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant