-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Problem Statement
Problem
The graphqlClientIntegration currently only extracts operation information from the query field in GraphQL requests. This means persisted operations aren't tracked - a common production optimization where clients send only operationName and a hash instead of the full query string.
Current behavior:
✅ Request with query: Creates span with operation name
❌ Request with persisted operation (no query field): No span created or missing operation details
Example persisted operation request:
{
"operationName": "GetUser",
"variables": { "id": "123" },
"extensions": {
"persistedQuery": {
"version": 1,
"sha256Hash": "abc123..."
}
}
}
Use Case
We're using this in production at a large e-commerce platform with 100+ frontend developers. Persisted operations reduce payload size and improve security. This change gives us both benefits.
Solution Brainstorm
Solution
- Detect persisted operations: Check for operationName when query is missing
- Create descriptive span names: Use "persisted {operationName}" format
- Add operation attribute: Store operation name without the full query body
- Maintain backward compatibility: Normal query-based requests work exactly as before
Changes:
- Extract operation name from request body when query field is absent
- Add span attribute for operation name on persisted queries
- Update span description to indicate persisted operations
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Labels
Projects
Status