feat(ir): add scaffolding for GraphQL SDK generation via Transport.graphql#16722
Draft
cadesark wants to merge 6 commits into
Draft
feat(ir): add scaffolding for GraphQL SDK generation via Transport.graphql#16722cadesark wants to merge 6 commits into
cadesark wants to merge 6 commits into
Conversation
Layer 1 - IR Changes: - Add Transport.graphql variant to http.yml union type - Create graphql.yml defining GraphqlTransport + GraphqlOperationType - Bump IR version 67.6.0 → 67.7.0 - Update CHANGELOG.md Layer 2 - GraphQL → IR Converter: - GraphQLToIRConverter class (main entry point, parallel to ProtobufIRGenerator) - ir-conversion/convertGraphQLTypes.ts (schema types → IR TypeDeclarations) - ir-conversion/convertRootFieldToEndpoint.ts (root fields → HttpEndpoints) Layer 5 - Query Auto-Generation: - query-generation/generateSelectionQuery.ts (depth-limited full selection) - SelectionSetBuilder class with cycle detection + max depth cap Layer 3 - Pipeline Integration: - GraphQLIRGenerator in lazy-fern-workspace (calls GraphQLToIRConverter) - INTEGRATION_NOTES.md documenting OSSWorkspace + SdkChecker changes All files are stubs with TODO markers — no implementation logic yet. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds the file structure and type stubs for GraphQL SDK generation using "Path B" (GraphQL-Aware approach). Each GraphQL root field becomes a synthetic
HttpEndpointwith a newTransport.graphqlvariant carrying a pre-built query string, typed variables as the request body, and the unwrapped return type as the response.No implementation logic yet — all functions are stubs with TODO markers describing the algorithm at each point.
Changes Made
Layer 1: IR Type Changes
graphql.ymldefinition file (parallel toproto.yml):GraphqlTransport { query: string, operationType, operationName }GraphqlOperationTypeenum:QUERY | MUTATION | SUBSCRIPTIONgraphql: graphql.GraphqlTransportvariant toTransportunion inhttp.yml67.6.0→67.7.0Layer 2: GraphQL → IR Converter
GraphQLToIRConverterclass — main entry, parallel toProtobufIRGeneratorir-conversion/convertGraphQLTypes.ts— schema objects/enums/unions → IRTypeDeclarationsir-conversion/convertRootFieldToEndpoint.ts— root field →HttpEndpointwithTransport.graphqlLayer 5: Query Auto-Generation
query-generation/generateSelectionQuery.ts— produces full-selection query string per root fieldSelectionSetBuilderclass — hybrid depth limiting (cycle detection + max depth 4 cap)Layer 3: Pipeline Integration
GraphQLIRGeneratorinlazy-fern-workspace/src/graphql/— calls converter, returns IR for mergingINTEGRATION_NOTES.md— documents exact OSSWorkspace + SdkChecker changes needed to wire it inExports
packages/cli/api-importers/graphql/src/index.tsto exportGraphQLToIRConverter+ query utilitiesTesting
pnpm ir:generateand generator updates are deferred until stubs are implementedLink to Devin session: https://app.devin.ai/sessions/d32b64ce79af434b8e931a4fd849e058
Requested by: @cadesark