import 'reflect-metadata' ; import { graphql , GraphQLSchema } from 'graphql' ; import { Maybe } from 'graphql/jsutils/Maybe' ; import { createSchema } from './createSchema' ; interface Options { source : string ; variableValues ? : Maybe < { [ key ] : any ; } > ; } let schema ; export const callSchema = async ( { source , variableValues } ) => { schema = await createSchema ( ) ; return graphql ( { schema , source , variableValues , } ) ; } ;