import { ITransport , TransportResponse } from '../transport' ; export class GraphQLHandler { private transport : ITransport ; constructor ( transport ) { this . transport = transport ; } private async request < T > ( base , query , variables ? ) { return await this . transport . post < T > ( base , { query , variables : typeof variables === 'undefined' ? { } : variables , } ) ; } async items < T > ( query , variables ? ) { return await this . request ( '/graphql' , query , variables ) ; } async system < T > ( query , variables ? ) { return await this . request ( '/graphql/system' , query , variables ) ; } }