import { GraphQLClient as GraphQLClientClass } from 'graphql-request/dist/index' ; interface ApiOptions { [ key ] : any ; } export default class Api { private client : GraphQLClientClass ; constructor ( client ) { this . client = client ; } async query ( operation , options ? ) { if ( ! this . client ) { throw new Error ( 'Missing client, construct with Buycoins class' ) ; } return this . client . request ( operation , options ) ; } }