Skip to content

docs: clarify type-check workflow with private packages#2629

Merged
paales merged 4 commits into
canaryfrom
docs/clarify-typecheck-with-private-packages
May 20, 2026
Merged

docs: clarify type-check workflow with private packages#2629
paales merged 4 commits into
canaryfrom
docs/clarify-typecheck-with-private-packages

Conversation

@paales
Copy link
Copy Markdown
Member

@paales paales commented May 20, 2026

Summary

Documents that you can only type check an example, never the whole repo, and that any optional/private package needs three things done in order before tsgo sees its injected fragments:

  1. Activate via PRIVATE_ADDITIONAL_DEPENDENCIES
  2. yarn install to symlink the workspace
  3. yarn codegen so fragments land in the example's .gql.ts

Skipping any of these produces confusing "field does not exist" errors on injected fragments that look like the type system is broken when really the example just hasn't been told the package exists.

Test plan

  • CLAUDE.md renders correctly on GitHub.
  • No code changes.

🤖 Generated with Claude Code

Spell out that type checking only works per-example, and that any
optional/private package must be activated via
PRIVATE_ADDITIONAL_DEPENDENCIES (with `yarn install` to link the
workspace) and codegen must be re-run before tsgo sees its injected
fragments. Documents the three-step workflow that currently fails
silently with confusing "field does not exist" errors when skipped.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
graphcommerce-246 Ready Ready Preview May 20, 2026 1:02pm
graphcommerce-247 Ready Ready Preview May 20, 2026 1:02pm
graphcommerce-hygraph-dynamic-rows-ui Ready Ready Preview May 20, 2026 1:02pm
graphcommerce-open-source Ready Ready Preview May 20, 2026 1:02pm
graphcommerce-storyblok Ready Ready Preview May 20, 2026 1:02pm

Request Review

Two doc additions:

- `graphcommerce cleanup-interceptors` restores `.original.*` files over
  the codegen-wrapped originals. Always run before committing so dozens
  of unrelated `next-ui`/`magento-*` wrappers don't pollute the diff.

- Every feature PR must include a usage example. For UI components,
  add a demo route under `packages/demo-magento-graphcommerce/copy/pages/test/`
  and link it from the test overview; for plugins, wire them into one
  of the example storefronts so the diff shows the integration point.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 20, 2026

🦋 Changeset detected

Latest commit: cbe732a

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

This PR includes changesets to release 86 packages
Name Type
@graphcommerce/misc Patch
@graphcommerce/docs Patch
@graphcommerce/browserslist-config-pwa Patch
@graphcommerce/changeset-changelog Patch
@graphcommerce/eslint-config-pwa Patch
@graphcommerce/graphql-codegen-markdown-docs Patch
@graphcommerce/graphql-codegen-near-operation-file Patch
@graphcommerce/graphql-codegen-relay-optimizer-plugin Patch
@graphcommerce/next-config Patch
@graphcommerce/prettier-config-pwa Patch
@graphcommerce/typescript-config-pwa Patch
@graphcommerce/address-fields-nl Patch
@graphcommerce/algolia-categories Patch
@graphcommerce/algolia-insights Patch
@graphcommerce/algolia-personalization Patch
@graphcommerce/algolia-products Patch
@graphcommerce/algolia-recommend Patch
@graphcommerce/algolia-search Patch
@graphcommerce/cli Patch
@graphcommerce/demo-magento-graphcommerce Patch
@graphcommerce/ecommerce-ui Patch
@graphcommerce/framer-next-pages Patch
@graphcommerce/framer-scroller Patch
@graphcommerce/framer-utils Patch
@graphcommerce/google-datalayer Patch
@graphcommerce/google-playstore Patch
@graphcommerce/googleanalytics Patch
@graphcommerce/googlerecaptcha Patch
@graphcommerce/googletagmanager Patch
@graphcommerce/graphcms-ui Patch
@graphcommerce/graphql-mesh Patch
@graphcommerce/graphql Patch
@graphcommerce/hygraph-cli Patch
@graphcommerce/hygraph-dynamic-rows-ui Patch
@graphcommerce/hygraph-dynamic-rows Patch
@graphcommerce/hygraph-ui Patch
@graphcommerce/image Patch
@graphcommerce/lingui-next Patch
@graphcommerce/magento-cart-checkout Patch
@graphcommerce/magento-cart-coupon Patch
@graphcommerce/magento-cart-email Patch
@graphcommerce/magento-cart-items Patch
@graphcommerce/magento-cart-payment-method Patch
@graphcommerce/magento-cart-pickup Patch
@graphcommerce/magento-cart-shipping-address Patch
@graphcommerce/magento-cart-shipping-method Patch
@graphcommerce/magento-cart Patch
@graphcommerce/magento-category Patch
@graphcommerce/magento-cms Patch
@graphcommerce/magento-compare Patch
@graphcommerce/magento-customer Patch
@graphcommerce/magento-graphql-rest Patch
@graphcommerce/magento-graphql Patch
@graphcommerce/magento-newsletter Patch
@graphcommerce/magento-payment-adyen Patch
@graphcommerce/magento-payment-afterpay Patch
@graphcommerce/magento-payment-braintree Patch
@graphcommerce/magento-payment-included Patch
@graphcommerce/magento-payment-klarna Patch
@graphcommerce/magento-payment-multisafepay Patch
@graphcommerce/magento-payment-paypal Patch
@graphcommerce/magento-payment-tokens Patch
@graphcommerce/magento-product-bundle Patch
@graphcommerce/magento-product-configurable Patch
@graphcommerce/magento-product-downloadable Patch
@graphcommerce/magento-product-grouped Patch
@graphcommerce/magento-product-simple Patch
@graphcommerce/magento-product-virtual Patch
@graphcommerce/magento-product Patch
@graphcommerce/magento-recently-viewed-products Patch
@graphcommerce/magento-review Patch
@graphcommerce/magento-search-overlay Patch
@graphcommerce/magento-search Patch
@graphcommerce/magento-store Patch
@graphcommerce/magento-wishlist Patch
@graphcommerce/mollie-magento-payment Patch
@graphcommerce/next-ui Patch
@graphcommerce/react-hook-form Patch
@graphcommerce/service-worker Patch
@graphcommerce/storyblok-ui Patch
@graphcommerce/framer-next-pages-example Patch
@graphcommerce/framer-scroller-example Patch
@graphcommerce/image-example Patch
@graphcommerce/magento-graphcms Patch
@graphcommerce/magento-open-source Patch
@graphcommerce/magento-storyblok 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

…t route

Earlier wording suggested adding a `pages/test/<feature>.tsx` demo route
counted as a showcase. It does not — that route lives outside the real
flow, reviewers don't walk through it, and the integration with the
storefront stays unproven.

Replace the section with a stricter rule: every feature PR must wire
the feature into one of the existing example storefronts so it is
visible on a real page (product page, account flow, cart page, etc.).
The PR's "Test plan" must name the URL the reviewer opens to see it
working, and any backend prerequisites (Magento product config, Hygraph
content) must be called out.
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