import { Resolver } from 'graphql-compose' ; export function addQueryToPayload ( resolvers ) { Object . keys ( resolvers ) . forEach ( ( k ) => { resolvers [ k ] . getOTC ( ) . setField ( 'query' , { type : 'Query' , resolve : ( ) => ( { } ) , } ) ; } ) ; return resolvers ; }