import { SetMetadata } from '@nestjs/common' ; import { SCHEMA_TYPE_PLUGIN_METADATA , PLUGIN_DETAILS_METADATA , } from '../postgraphile.constants' ; import { PluginType } from '../enums/plugin-type.enum' ; import { WrapResolverOptions } from '../interfaces/wrap-resolver-options.interface' ; export function WrapResolver ( options ) { return ( target , propertyKey ? , descriptor ? ) => { SetMetadata ( SCHEMA_TYPE_PLUGIN_METADATA , PluginType . WRAP_RESOLVER ) ( target , propertyKey , descriptor ) ; SetMetadata ( PLUGIN_DETAILS_METADATA , options ) ( target , propertyKey , descriptor ) ; } ; }