Split trust node lookup into node and aliasedNode

The trust node query previously accepted a String and resolved both GIDs
and slugs through one field, which forced the frontend to lose the ID
type guarantee. Restore node(id: ID!) as a strict GID lookup and add a
dedicated aliasedNode(alias: String!) that parses a GID first and falls
back to slug resolution before delegating to Node.

Inline the former nodeByGID switch directly into Node and drop the helper
file. Point the trust DocumentPage query at aliasedNode so slug-or-ID URLs
keep working.

Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
Bryan Frimin
2026-06-22 11:24:43 +02:00
parent bfd672e0fe
commit cb7fb8f5e9
5 changed files with 138 additions and 164 deletions

View File

@@ -24,7 +24,8 @@ interface Node {
type Query {
viewer: Identity
node(id: String!): Node
node(id: ID!): Node
aliasedNode(alias: String!): Node
currentTrustCenter: TrustCenter
oidcProviders: [OIDCProviderInfo!]!
@goField(forceResolver: true)