diff --git a/.github/workflows/make.yaml b/.github/workflows/make.yaml index b1b8b2dc1..4ef199079 100644 --- a/.github/workflows/make.yaml +++ b/.github/workflows/make.yaml @@ -27,7 +27,7 @@ jobs: with: go: "false" - run: "npm --workspace @probo/emails run build" - - run: "npm run relay" + - run: "make relay" - name: "Build console" run: | npm --workspace @probo/console run check @@ -304,7 +304,7 @@ jobs: go: "false" - uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1.5.0 - name: "Generate Relay artifacts" - run: npm run relay + run: make relay - name: "Run eslint" env: REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 58df04e17..389260e90 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -24,7 +24,7 @@ jobs: with: go: "false" - run: "npm --workspace @probo/emails run build" - - run: "npm run relay" + - run: "make relay" - name: "Build console" run: | npm --workspace @probo/console run check diff --git a/GNUmakefile b/GNUmakefile index 40dede001..fd455309c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -225,7 +225,7 @@ RELAY_SCHEMAS = \ .PHONY: relay relay: $(RELAY_SCHEMAS) - $(NPM) run relay + $(NPX) relay-compiler MERGE_GRAPHQL = contrib/merge-graphql-schema.sh @@ -262,8 +262,8 @@ generate: pkg/server/api/connect/v1/schema/schema.go \ pkg/server/api/trust/v1/schema/schema.go \ pkg/server/api/trust/v1/types/types.go \ pkg/server/api/mcp/v1/server/server.go \ - pkg/server/api/mcp/v1/types/types.go - $(NPM) run relay + pkg/server/api/mcp/v1/types/types.go \ + relay pkg/server/api/connect/v1/schema/schema.go \ pkg/server/api/connect/v1/types/types.go: pkg/server/api/connect/v1/gqlgen.yaml $(wildcard pkg/server/api/connect/v1/graphql/*.graphql) diff --git a/apps/console/CLAUDE.md b/apps/console/CLAUDE.md index a8f5786c2..a6b426dc5 100644 --- a/apps/console/CLAUDE.md +++ b/apps/console/CLAUDE.md @@ -8,7 +8,7 @@ React 19 + Vite + TypeScript + Relay + TailwindCSS. Port 5173. |---------|---------| | `npm run dev` | Start dev server (port 5173) | | `npm run build` | Production build | -| `npm run relay` (from repo root) | Regenerate Relay artifacts | +| `make relay` | Merge split schemas and regenerate Relay artifacts | ## Routes diff --git a/contrib/claude/relay.md b/contrib/claude/relay.md index f3224b0aa..8a448deee 100644 --- a/contrib/claude/relay.md +++ b/contrib/claude/relay.md @@ -20,8 +20,7 @@ Configured in `apps/console/src/environments.ts`. Each has its own store with 1- Config lives in `relay.config.json` at the repo root with three projects (`core`, `iam`, `trust`) mapped to different source directories and schemas. Each project uses `schema` pointing to `base.graphql` and `schemaExtensions` pointing to the `graphql/` directory containing the per-entity schema files. Generated files go into `__generated__/` directories. ```sh -npm run relay # clean + compile (from repo root) -npm run relay-compile # compile only (from repo root) +make relay # merge split schemas + clean + compile ``` Custom scalar mappings: `Datetime → string`, `GID → string`, `CursorKey → string`, `Duration → string`, `BigInt → number`, `EmailAddr → string`.