NestJS 通过 @nestjs/graphql 对 GraphQL 提供了一流的支持(基于 Apollo Server)。它提供了 code-first 方法(用 TypeScript 类和装饰器定义 schema,schema 自动生成)— 这是 NestJS 的惯用方式 — 完美适配框架的装饰器/DI 模型。
设置 GraphQL(code-first)
({
: [
.<>({
: ,
: ,
: ,
}),
],
})
{}
