import * as build from '@kbrandwijk/swagger-to-graphql' ; import { Binding } from 'graphql-binding' ; import { QueryMap , SubscriptionMap } from 'graphql-binding/dist/types' ; export class OpenApi { static async init ( openapi , endpoint = null ) { const schema = await build ( openapi , endpoint ) ; return new Binding < QueryMap , SubscriptionMap > ( { schema , fragmentReplacements : { } } ) ; } }