Skip to content

LTRAC-1343: docs - Settle whether scaffolded projects commit GraphQL artifacts - #3195

Merged
jorgemoya merged 1 commit into
canaryfrom
jorgemoya/ltrac-1343-graphql-artefacts
Aug 26, 2026
Merged

LTRAC-1343: docs - Settle whether scaffolded projects commit GraphQL artifacts#3195
jorgemoya merged 1 commit into
canaryfrom
jorgemoya/ltrac-1343-graphql-artefacts

Conversation

@jorgemoya

Copy link
Copy Markdown
Contributor

Linear: LTRAC-1343

What/Why?

A merchant reported bigcommerce.graphql and bigcommerce-graphql.d.ts showing up untracked right after setup, and asked the reasonable question: commit them, or gitignore them? Nothing in a scaffolded project answers that.

Documentation only — no behaviour change.

Two details that make the report legitimate rather than user error:

  • The two contexts genuinely disagree, and neither is documented. A scaffolded project is the extracted core/ directory, so its .gitignore is core/.gitignore, which doesn't list either file. The monorepo's root .gitignore does. Merchants are supposed to commit them; contributors aren't. From inside a scaffolded project the omission is indistinguishable from an oversight, which is why this PR records the decision in core/.gitignore itself and warns in CONTRIBUTING.md against propagating the root entries down into it.
  • They appear after pnpm run dev, not after create. initGitRepo makes the initial commit before anything runs generate, so the files are always born untracked. The README now covers that moment explicitly with the git add to run.

The substantive argument for committing (the decision the ticket asked me to document) is that client/graphql.ts imports ~/bigcommerce-graphql, so lint and typecheck can't resolve without the .d.ts. Committing it means a merchant's CI can typecheck a PR with no store credentials — which is exactly the problem basic.yml solves the other way in this repo, by running pnpm run -r generate before lint and typecheck. Neither file is read at request time; build/deploy regenerate, so the committed copy is never what ships.

Included a @bigcommerce/catalyst-core patch changeset so the guidance reaches existing projects through the changelog, not just new ones.

Not addressed here

Two adjacent problems I found and left alone as out of scope, both worth their own tickets:

  • Root graphql.config.json points at core/schema.graphql, which doesn't exist anywhere in the repo.
  • core/README.md's footer links to /docs, so that link is broken in every scaffolded project.

Also worth considering: the CLI's post-create "Next steps" output is where the merchant actually hits this, so a line there would catch people who never open the README. The ticket scoped this to docs, so the CLI is untouched.

Testing

npx prettier --check core/README.md passes. CONTRIBUTING.md has one pre-existing prettier warning at canary (a list-continuation blank line in the release section) that I deliberately left in place rather than reformatting an unrelated part of the file; the section I added is prettier-clean.

Worth a reviewer's eye on the accuracy of the claims rather than the prose:

  • core/scripts/generate.cjs writes both files and requires BIGCOMMERCE_STORE_HASH + BIGCOMMERCE_STOREFRONT_TOKEN (channel ID optional), a subset of REQUIRED_BUILD_ENV_VARS.
  • git check-ignore -v core/bigcommerce.graphql in the monorepo resolves to the root .gitignore — confirming the comment lands in the file that actually does the ignoring.

Migration

None. No files moved, no breaking changes.

🤖 Generated with Claude Code

@changeset-bot

changeset-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ed62f8a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview Aug 26, 2026 8:37pm

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Size Report

Comparing against baseline from d263871 (2026-08-26).

No bundle size changes detected.

@jorgemoya
jorgemoya marked this pull request as ready for review August 26, 2026 20:36
@jorgemoya
jorgemoya requested a review from a team as a code owner August 26, 2026 20:36
…artifacts

`npm run generate` writes `bigcommerce.graphql` and `bigcommerce-graphql.d.ts`
to the project root, and `catalyst create` makes its initial commit before
anything runs `generate`. Both files therefore appear as untracked the first
time a merchant runs `pnpm run dev`, with nothing in the project saying what
they are, whether they are read at runtime, or whether the intent was to commit
or ignore them.

Document in the scaffolded project's README that both files should be committed,
name `generate` as the command that produces them, and describe local versus
build-time regeneration. Record the same decision in `core/.gitignore`, where
their absence otherwise looks like an oversight.

Explain in CONTRIBUTING.md why the monorepo does the opposite: contributors work
against unreleased Storefront API schemas on their own test stores, so a
committed schema here would generate diffs belonging to no change and conflict
between `canary` and the `integrations/*` branches. CI regenerates from store
credentials before it lints and typechecks.

Refs LTRAC-1343
Co-Authored-By: Claude <noreply@anthropic.com>
@jorgemoya
jorgemoya force-pushed the jorgemoya/ltrac-1343-graphql-artefacts branch 2 times, most recently from 5912171 to ed62f8a Compare August 26, 2026 20:37
@jorgemoya
jorgemoya enabled auto-merge August 26, 2026 20:38
@jorgemoya
jorgemoya added this pull request to the merge queue Aug 26, 2026
Merged via the queue into canary with commit b6cc8f4 Aug 26, 2026
25 of 28 checks passed
@jorgemoya
jorgemoya deleted the jorgemoya/ltrac-1343-graphql-artefacts branch August 26, 2026 21:04
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Unlighthouse Performance Comparison — Vercel

Comparing PR preview deployment Unlighthouse scores vs production Unlighthouse scores.

Summary Score

Aggregate score across all categories as reported by Unlighthouse.

Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Score 90 93 91 95

Category Scores

Category Prod Desktop Prod Mobile Preview Desktop Preview Mobile
Performance 77 80 73 78
Accessibility 95 98 95 98
Best Practices 100 100 100 100
SEO 88 88 88 100

Core Web Vitals

Metric Prod Desktop Prod Mobile Preview Desktop Preview Mobile
LCP 3.6 s 5.2 s 4.3 s 5.9 s
CLS 0.001 0 0.037 0
FCP 1.2 s 1.2 s 1.2 s 1.2 s
TBT 0 ms 10 ms 0 ms 0 ms
Max Potential FID 50 ms 60 ms 40 ms 40 ms
Time to Interactive 3.6 s 5.3 s 4.3 s 5.9 s

Full Unlighthouse report →

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