@nestjs/graphql
Version:
GraphQL for NestJS: code-first and schema-first APIs, resolvers as providers, subscriptions, federation and generated SDL, on Apollo or Mercurius.
11 lines (10 loc) • 390 B
JavaScript
import { GqlParamtype } from '../enums/gql-paramtype.enum.js';
import { createGqlParamDecorator } from './param.utils.js';
/**
* Resolver method parameter decorator. Extracts the parent/root
* object from the underlying platform and populates the decorated
* parameter with the value of parent/root.
*
* @publicApi
*/
export const Parent = createGqlParamDecorator(GqlParamtype.ROOT);