Skip to content

Conversation

@redreceipt
Copy link
Member

Summary

  • add a script to generate Apollo fragment types via schema introspection
  • run the generator in predev/prebuild/prestart and expose a manual npm script
  • stop tracking fragmentTypes.json and ignore it in git

Testing

  • not run (generator runs in pre* scripts)

@vercel
Copy link

vercel bot commented Dec 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
longhollow-web Ready Ready Preview, Comment Dec 22, 2025 3:28pm

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 16 to 18
"lint": "eslint .",
"test": "jest --watch"
"test": "jest --watch",
"generate:fragment-types": "node scripts/generate-fragment-types.js"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Generate fragment types before running tests

lib/apolloClient/initCache.js still imports ./fragmentTypes.json, but that file is now removed/ignored and the generator is only wired to predev, prebuild, and prestart. Running npm test in a fresh checkout (e.g. in CI) loads pages/index.js, which imports initializeApollo and fails with Cannot find module './fragmentTypes.json' because the pretest hook never runs the generator. Please generate fragment types before tests or keep the file checked in so tests can run from a clean tree.

Useful? React with 👍 / 👎.

@redreceipt redreceipt merged commit 922c435 into main Dec 22, 2025
4 checks passed
@redreceipt redreceipt deleted the chore/auto-generate-fragment-types branch December 22, 2025 15:28
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.

2 participants