Drop merged GraphQL schema for split files
Relay no longer needs a single merged schema.graphql: each project in relay.config.json now reads the split graphql/*.graphql files directly via `schema` (base.graphql) plus `schemaExtensions`. gqlgen already consumed the split files, so the merge step only fed Relay and the optional IDE GraphQL extension. Remove the merge machinery (contrib/merge-graphql-schema.sh, the RELAY_SCHEMAS make rules, and the gitignore entry) and drop the graphql-config files (apps/trust/graphql.config.yml and the root package.json graphql field); the Relay extension provides schema-aware language features from relay.config.json on its own. relay-compiler keeps generated artifacts in sync (stale ones are removed automatically), so the relay npm script just runs the local relay-compiler and the make target delegates to it. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
20
GNUmakefile
20
GNUmakefile
@@ -282,30 +282,14 @@ $(PROBO_AGENT_BIN):
|
||||
@probo/emails:
|
||||
$(NPM) --workspace $@ run build
|
||||
|
||||
RELAY_SCHEMAS = \
|
||||
pkg/server/api/connect/v1/schema.graphql \
|
||||
pkg/server/api/console/v1/schema.graphql \
|
||||
pkg/server/api/trust/v1/schema.graphql
|
||||
|
||||
.PHONY: relay
|
||||
relay: $(RELAY_SCHEMAS)
|
||||
$(NPX) relay-compiler
|
||||
|
||||
MERGE_GRAPHQL = contrib/merge-graphql-schema.sh
|
||||
relay:
|
||||
$(NPM) run relay
|
||||
|
||||
CONNECT_GQL = $(wildcard pkg/server/api/connect/v1/graphql/*.graphql)
|
||||
CONSOLE_GQL = $(wildcard pkg/server/api/console/v1/graphql/*.graphql)
|
||||
TRUST_GQL = $(wildcard pkg/server/api/trust/v1/graphql/*.graphql)
|
||||
|
||||
pkg/server/api/connect/v1/schema.graphql: pkg/server/api/connect/v1/graphql $(CONNECT_GQL)
|
||||
$(MERGE_GRAPHQL) $@ pkg/server/api/connect/v1/graphql
|
||||
|
||||
pkg/server/api/console/v1/schema.graphql: pkg/server/api/console/v1/graphql $(CONSOLE_GQL)
|
||||
$(MERGE_GRAPHQL) $@ pkg/server/api/console/v1/graphql
|
||||
|
||||
pkg/server/api/trust/v1/schema.graphql: pkg/server/api/trust/v1/graphql $(TRUST_GQL)
|
||||
$(MERGE_GRAPHQL) $@ pkg/server/api/trust/v1/graphql
|
||||
|
||||
.PHONY: @probo/console
|
||||
@probo/console: NODE_ENV=production
|
||||
@probo/console: relay
|
||||
|
||||
Reference in New Issue
Block a user