Replace npm run relay with make relay everywhere
The make relay target merges split graphql files into a single schema.graphql before running the Relay compiler. All CI workflows, the generate target, and documentation now use make relay. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
4
.github/workflows/make.yaml
vendored
4
.github/workflows/make.yaml
vendored
@@ -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 }}
|
||||
|
||||
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user