@nestjs-stitcher/gateway
v0.1.0
Published
Schema stitching gateway module for NestJS GraphQL
Maintainers
Readme
@nestjs-stitcher/gateway
Schema stitching gateway module for NestJS GraphQL.
Installation
npm install @nestjs-stitcher/gatewayUsage
import { Module } from '@nestjs/common';
import { GatewayModule, AuthVisitor, SignatureVisitor } from '@nestjs-stitcher/gateway';
@Module({
imports: [
GatewayModule.forRoot({
endpointsConfigPath: './config.yml',
hmacSecret: process.env.HMAC_SECRET,
extensionVisitors: [
new AuthVisitor(),
new SignatureVisitor({ hmacSecret: process.env.HMAC_SECRET }),
],
autoReloadInterval: 300_000,
}),
],
})
export class AppModule {}Endpoints Config (config.yml)
endpoints:
- name: users-service
hash: abc123
url: https://localhost:4001/graphql
- name: products-service
hash: def456
url: https://localhost:4002/graphqlDocumentation
For full documentation and architecture overview, see the main README.
License
MIT
