Skip to content

feat(graphql): extract operationType from the req. body#4574

Open
mortargrind wants to merge 1 commit intoDataDog:mainfrom
mortargrind:feat/graphql/opeation-type-in-body
Open

feat(graphql): extract operationType from the req. body#4574
mortargrind wants to merge 1 commit intoDataDog:mainfrom
mortargrind:feat/graphql/opeation-type-in-body

Conversation

@mortargrind
Copy link
Copy Markdown

@mortargrind mortargrind commented May 7, 2026

Resolves: #4563

Motivation

Persisted GraphQL operations do not have a query property that contains the full operation string. As a result operationType cannot be extracted for them.

Changes

An alternative way of extracting operationType from a dedicated operationType param is added. The current way of extracting the value has higher precedence over this new alternative.

Test instructions

Manual testing: If a GraphQL request has operationType in its body or in query params as 'query'|'mutation'|'subscription' and operationType cannot be extracted from the query property.

Checklist

  • Tested locally
  • Tested on staging
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated documentation and/or relevant AGENTS.md file

@mortargrind mortargrind changed the title feat(graphql): infer operationType from the req. body feat(graphql): extract operationType from the req. body May 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@mortargrind
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@mortargrind mortargrind marked this pull request as ready for review May 8, 2026 08:35
@mortargrind mortargrind requested a review from a team as a code owner May 8, 2026 08:35
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.

Providing operationType for persisted GraphQL operations

1 participant