import { DocumentNode } from 'graphql' ; import { setMutationMetadata } from '../metadata/mutation' ; import { getMutation } from '../mutation' ; import { MutationMethod , MutationObject } from '../types/mutation' ; export function Mutation ( mutation ) { return function ( target , name , _descriptor ) { setMutationMetadata ( target , name , getMutation ( mutation ) || ( mutation as string ) ) ; } ; }