Skip to content

feat(codegen): re-export FetchAdapter from ORM barrel#1203

Merged
pyramation merged 1 commit into
mainfrom
feat/codegen-export-fetch-adapter
May 20, 2026
Merged

feat(codegen): re-export FetchAdapter from ORM barrel#1203
pyramation merged 1 commit into
mainfrom
feat/codegen-export-fetch-adapter

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

Summary

Split from #1200 (Issue 2 only).

Adds FetchAdapter to the barrel re-export from ./client in the generated index.ts, so it's importable via @scope/sdk/orm without needing a separate /client subpath.

Context: FetchAdapter is the default GraphQLAdapter implementation that wraps createFetch() from @constructive-io/fetch. It's already present in every generated client.ts. This change only affects the barrel export — making it accessible from the top-level ORM import.

Note from investigation: This may not be necessary — end users don't typically construct FetchAdapter directly. The OrmClientConfig already exposes endpoint, fetch, and adapter options that handle all use cases (including test mocking). Consider whether this export surface is actually needed.

Files changed:

  • graphql/codegen/src/core/codegen/orm/client-generator.ts — added FetchAdapter to barrel export AST
  • graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap — updated 2 snapshots

Review & Testing Checklist for Human

  • Decide if FetchAdapter should be part of the public SDK API surface, or if it should remain an internal implementation detail
  • Run cd graphql/codegen && pnpm test to confirm all tests pass

Notes

This is Issue 2 from the original PR #1200. Issue 1 (BulkUploadFileInput types) is in a separate PR. Dan flagged that this export may be unnecessary since @constructive-io/fetch already exists and FetchAdapter is an internal default.

Link to Devin session: https://app.devin.ai/sessions/11c358ec8678488eba3255c53f3e440f
Requested by: @pyramation

Add FetchAdapter to the barrel re-export from ./client so it is
importable via @scope/sdk/orm without needing a separate /client
subpath import.
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@pyramation pyramation merged commit a2cf752 into main May 20, 2026
38 checks passed
@pyramation pyramation deleted the feat/codegen-export-fetch-adapter branch May 20, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant