@graphql-yoga/nestjs
TypeScript icon, indicating that this package has built-in type declarations

3.7.0 • Public • Published

GraphQL Yoga plugin for NestJS

Fully-featured GraphQL server as a plugin for the progressive Node.js framework.

Check out Yoga's documentation about NestJS integration!


Getting started

Install

npm i @nestjs/graphql graphql-yoga graphql @graphql-yoga/nestjs

Create application module

import { YogaDriver, YogaDriverConfig } from '@graphql-yoga/nestjs'
import { Module } from '@nestjs/common'
import { GraphQLModule } from '@nestjs/graphql'

@Module({
  imports: [
    GraphQLModule.forRoot<YogaDriverConfig>({
      driver: YogaDriver
    })
  ]
})
export class AppModule {}

Develop GraphQL

This is just a HTTP transport driver; meaning, everything else should work as showcased in NestJS documentation.

Apollo Federation

Separately, we offer a @graphql-yoga/nestjs-federation driver which allows building Apollo Federation Gateways and Services. Check it out!

Contributing

If this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

Feel free to open issues, pull requests and create discussions. Community support is always welcome!

Code of Conduct

Help us keep Yoga open and inclusive. Please read and follow our of Conduct as adopted from Contributor Covenant.

Package Sidebar

Install

npm i @graphql-yoga/nestjs

Weekly Downloads

20,394

Version

3.7.0

License

MIT

Unpacked Size

78.3 kB

Total Files

26

Last publish

Collaborators

  • wittydeveloper
  • kamilkisiela
  • urigo
  • dotansimha