feat(shared-ts): federation shared utilities for apollo subgraphs

- RouterAuthGuard: validate Router-Authorization header (ADR-036)

- DataLoader factory: request-scoped batching (ADR-035)

- ScopeTokenService: Redis-backed scope token (ADR-041)

- GraphqlContext: build context from HTTP headers

- FederationExceptionFilter: HTTP-to-GraphQL error mapping
This commit is contained in:
SpecialX
2026-07-14 23:46:51 +08:00
parent 3c2ea50c7f
commit 5fcb831a18
9 changed files with 1074 additions and 4 deletions

View File

@@ -11,6 +11,10 @@
"./bff": {
"types": "./dist/bff/index.d.ts",
"default": "./dist/bff/index.js"
},
"./federation": {
"types": "./dist/federation/index.d.ts",
"default": "./dist/federation/index.js"
}
},
"scripts": {
@@ -24,8 +28,11 @@
"@nestjs/common": "^10.4.0",
"@nestjs/core": "^10.4.0",
"@paralleldrive/cuid2": "^2.2.2",
"dataloader": "^2.2.2",
"drizzle-orm": "^0.31.0",
"graphql": "^16.9.0",
"graphql-yoga": "^5.7.0",
"ioredis": "^5.4.0",
"kafkajs": "^2.2.4",
"pino": "^9.4.0",
"prom-client": "^15.1.0",