UNPKG

@graphql-yoga/nestjs

Version:

GraphQL Yoga driver for NestJS GraphQL.

11 lines (9 loc) 306 B
import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common' import { GqlExecutionContext } from '@nestjs/graphql' @Injectable() export class CatsGuard implements CanActivate { canActivate(context: ExecutionContext): boolean { GqlExecutionContext.create(context) return true } }