Skip to content

feat: add codegen fixture example with schema and generated output#727

Closed
pyramation wants to merge 1 commit intomainfrom
devin/1771322020-codegen-fixture-example
Closed

feat: add codegen fixture example with schema and generated output#727
pyramation wants to merge 1 commit intomainfrom
devin/1771322020-codegen-fixture-example

Conversation

@pyramation
Copy link
Contributor

feat: add codegen fixture example with schema and generated output

Summary

Adds a __fixtures__/codegen-example/ directory demonstrating the full codegen pipeline output from a PostGraphile v5-style GraphQL schema. Contains:

  • schema.graphql — Hand-written input schema with 4 entities (User, Post, Comment, Category), connection types, filters, enums, and CRUD mutations
  • generate.ts — Script showing how to invoke generate() with schemaFile + orm: true
  • output/ — The actual generated ORM client code (models, client factory, query builder, select types, input types)

The output was produced by running the codegen against the example schema locally. This fixture exists purely to make the codegen output visible and reviewable without needing a database.

Review & Testing Checklist for Human

  • Verify generated output looks correct — Spot-check that the 4 model files (user, post, comment, category) have the expected CRUD methods (findMany, findFirst, findOne, create, update, delete) and that relation fields (e.g., User.posts, Post.author) are reflected in the select types
  • Check input-types.ts filter type bloat — The codegen generates ~775 lines of standard filter types (BigIntFilter, InternetAddressFilter, FullTextFilter, etc.) even though the schema only defines a few simple filters. Verify this is acceptable/expected behavior
  • Verify the schema is realistic enough — The hand-written schema mimics PostGraphile v5 patterns (Connection types, PageInfo, nested connection fields on entities). Confirm it's representative of real-world usage
  • generate.ts imports @constructive-io/graphql-codegen — The script was actually run with a relative import and then switched to the package import for the committed version. It won't run standalone without the package linked. Consider if this is fine as documentation or if it needs adjustment

Notes

  • The output files are @generated and import from @constructive-io/graphql-types — they're meant to show codegen output structure, not to be compiled independently
  • pnpm build passes with these fixture files present (they're not part of any workspace package)

Link to Devin run: https://app.devin.ai/sessions/467080f279b64f0b9d1b7600cc050971
Requested by: @pyramation

@devin-ai-integration
Copy link
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 closed this Feb 17, 2026
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