Add infrastructure for shared response types across operations #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds foundational infrastructure for sharing response types across GraphQL operations, extending the existing shared types mechanism that currently handles enums and input types.
Changes made:
responseClassToTypeSpecsmap toGraphQLClientGeneratorContextto store shared response typesGraphQLClientGeneratorfindSharedResponseTypehelper function for locating existing shared response typesThis PR provides the infrastructure foundation but does not yet implement the actual response type deduplication logic. The
responseClassToTypeSpecsmap is created but never populated, and thefindSharedResponseTypefunction is defined but not used in the type generation flow.Human Review Checklist:
responseClassToTypeSpecsmap gets populated during type generationfindSharedResponseTypefunction is called from the type generation logic.responses)Testing Status:
Link to Devin run: https://app.devin.ai/sessions/96938caaf2644460b3aad676dff2b2bf
Requested by: Arthur Poon (@akkp-windsurf)
🔗 Related Issues
This addresses the requirement to deduplicate response types across multiple GraphQL operations to reduce code duplication and improve efficiency.