@nestjs-toolkit/graphql-mercurius
v2.0.3
Published
NestJS Toolkit - GraphQL Mercurius
Downloads
106
Readme
Descrição
Ferramentas para facilitar o desenvolvimento de aplicações com NestJS, utilizando Mercurius GraphQL.
Instalação
$ yarn add @nestjs-toolkit/graphql-mercurius
Setup
import {Module} from '@nestjs/common';
import {GraphQLModule} from '@nestjs/graphql';
import {MercuriusDriver, MercuriusDriverConfig} from '@nestjs/mercurius';
import {CustomDateResolver, CustomNumberResolver} from '@nestjs-toolkit/graphql-mercurius/resolvers';
@Module({
imports: [
GraphQLModule.forRoot<MercuriusDriverConfig>({
driver: MercuriusDriver,
graphiql: true,
typePaths: [
'./**/*.graphql',
'./node_modules/@nestjs-toolkit/graphql-mercurius/schemas/*.graphql'
]
}),
],
providers: [CustomDateResolver, CustomNumberResolver],
})
export class AppModule {
}
Teste
# unit tests
$ yarn test
# test coverage
$ yarn test:cov