Skip to content

Conversation

@guendev
Copy link
Owner

@guendev guendev commented Oct 28, 2025

…build

Copilot AI review requested due to automatic review settings October 28, 2025 20:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR transitions the GraphQL codegen output from tracked to generated files by removing the generated files from Git and adding them to .gitignore. A postinstall script is added to ensure the generated files are created during package installation.

Key Changes

  • Generated GraphQL TypeScript files (gql.ts, graphql.ts, and the index.ts re-export) are removed from version control
  • The packages/operations/src/codegen/ directory is added to .gitignore
  • A postinstall script is added to package.json to automatically run graphql-codegen during installation

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/operations/src/codegen/index.ts Removed the generated re-export file from version control
packages/operations/src/codegen/graphql.ts Removed the generated GraphQL type definitions file from version control
packages/operations/src/codegen/gql.ts Removed the generated GraphQL client helper functions from version control
packages/operations/package.json Added postinstall script to regenerate codegen files during installation
.gitignore Added the codegen output directory to ignore generated files

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"scripts": {
"build": "graphql-codegen"
"build": "graphql-codegen",
"postinstall": "pnpm build"
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

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

Using postinstall to run codegen can cause issues in CI/CD environments and when consumers install this package. Consider using a prepare script instead, which runs on pnpm install for local development but not when the package is installed as a dependency. Alternatively, add explicit documentation that developers must run pnpm build manually after cloning, and ensure CI/CD pipelines include this step.

Suggested change
"postinstall": "pnpm build"
"prepare": "pnpm build"

Copilot uses AI. Check for mistakes.
@guendev guendev merged commit eadfe59 into main Oct 28, 2025
9 checks passed
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