Skip to content

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

Merged
rgaignault merged 2 commits into
DataDog:mainfrom
mortargrind:feat/graphql/opeation-type-in-body
May 12, 2026
Merged

feat(graphql): extract operationType from the req. body#4574
rgaignault merged 2 commits into
DataDog:mainfrom
mortargrind:feat/graphql/opeation-type-in-body

Conversation

@mortargrind

@mortargrind mortargrind commented May 7, 2026

Copy link
Copy Markdown

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

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

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
@datadog-datadog-prod-us1

This comment has been minimized.

@rgaignault rgaignault left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rgaignault
rgaignault force-pushed the feat/graphql/opeation-type-in-body branch from db9bdf8 to fed4d2d Compare May 12, 2026 12:30
@rgaignault
rgaignault force-pushed the feat/graphql/opeation-type-in-body branch from fed4d2d to f1c75b3 Compare May 12, 2026 13:12
@rgaignault
rgaignault merged commit 0fa3858 into DataDog:main May 12, 2026
24 of 25 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Providing operationType for persisted GraphQL operations

3 participants