-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Copy link
Description
Fix critical GraphQL syntax errors that occur when client directives (@SInCE, @deprecatedSince, @skipOnClient) remove all fields from fragments, leaving empty fragment definitions and orphaned fragment spreads.
Background/Purpose
The current GraphQL transformer implementation has a critical bug where client directives that remove all fields from fragments create invalid GraphQL syntax. This causes two types of errors:
- Empty fragment definitions without selection sets (e.g.,
fragment AgentStatsFragment on Query) - Fragment spreads referencing non-existent fragments (e.g.,
...AgentStatsFragmentwhen the fragment was removed)
These errors break GraphQL query execution in components like DashboardPage when backend versions don't support certain features.
Acceptance Criteria
- GraphQL transformer properly handles fragments emptied by client directives
- No syntax errors when client directives remove all fragment fields
- No "Unknown fragment" errors for orphaned fragment spreads
- Generated GraphQL queries remain valid and executable
- Maintains backward compatibility with existing functionality
Technical Impact
- Prevents runtime GraphQL errors in production
- Improves robustness of client-side query transformation
- Ensures proper version compatibility handling
JIRA Issue: FR-1663
Metadata
Metadata
Assignees
Labels
No labels