Fix Relay generating null query text for mutations

Relay v20 treats extend type in server schema as client extensions,
causing all mutation fields to have "text": null in generated artifacts.

Replace the cat-based schema concatenation with a merge script that
collects all extend type Mutation blocks and produces a single
type Mutation definition. The split graphql/ files remain the source
of truth for gqlgen; the merged schema.graphql is generated for Relay.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-14 19:44:28 +04:00
parent 1962ec07ab
commit 00b233aa03
4 changed files with 70 additions and 7 deletions

View File

@@ -7,8 +7,7 @@
},
"projects": {
"core": {
"schema": "pkg/server/api/console/v1/graphql/base.graphql",
"schemaExtensions": ["pkg/server/api/console/v1/graphql"],
"schema": "pkg/server/api/console/v1/schema.graphql",
"language": "typescript",
"noFutureProofEnums": true,
"output": "apps/console/src/__generated__/core",
@@ -23,8 +22,7 @@
}
},
"iam": {
"schema": "pkg/server/api/connect/v1/graphql/base.graphql",
"schemaExtensions": ["pkg/server/api/connect/v1/graphql"],
"schema": "pkg/server/api/connect/v1/schema.graphql",
"language": "typescript",
"noFutureProofEnums": true,
"output": "apps/console/src/__generated__/iam",
@@ -39,8 +37,7 @@
}
},
"trust": {
"schema": "pkg/server/api/trust/v1/graphql/base.graphql",
"schemaExtensions": ["pkg/server/api/trust/v1/graphql"],
"schema": "pkg/server/api/trust/v1/schema.graphql",
"language": "typescript",
"noFutureProofEnums": true,
"customScalarTypes": {