Restore GraphQL schema merge for Relay query text

relay-compiler requires a single schema file: a directory is rejected
and schemaExtensions marks fields as client-only, so it emitted
text: null and the console posted query: null, getting a 400 on every
operation.

Restore the merge step (contrib/merge-graphql-schema.sh, the
RELAY_SCHEMAS make rules, and the gitignore entry) and point each
relay.config.json project back at the merged schema.graphql. The IDE
graphql-config removal and npm-script cleanup are unrelated and stay.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-06-19 14:57:28 +02:00
parent 4348c409a1
commit 4433e0a9d0
5 changed files with 66 additions and 8 deletions

View File

@@ -282,14 +282,30 @@ $(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: $(RELAY_SCHEMAS)
$(NPM) run relay
MERGE_GRAPHQL = contrib/merge-graphql-schema.sh
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