UNPKG

@apollo-orbit/angular

Version:

A full-featured GraphQL client for Angular

38 lines (33 loc) 1.39 kB
import * as i0 from '@angular/core'; import { Injectable } from '@angular/core'; import { makeFetch } from '@apollo-orbit/angular/fetch'; import { BatchHttpLink } from '@apollo/client/link/batch-http'; import * as i1 from '@angular/common/http'; class BatchHttpLinkFactory { httpClient; constructor(httpClient) { this.httpClient = httpClient; } create(options = {}) { return new BatchHttpLink({ ...options, fetch: makeFetch(this.httpClient) }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: BatchHttpLinkFactory, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: BatchHttpLinkFactory }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: BatchHttpLinkFactory, decorators: [{ type: Injectable }], ctorParameters: () => [{ type: i1.HttpClient }] }); function withBatchHttpLink() { return { kind: 'APOLLO_ORBIT_BATCH_HTTP_LINK', providers: [BatchHttpLinkFactory] }; } /** * Generated bundle index. Do not edit. */ export { BatchHttpLinkFactory, withBatchHttpLink }; //# sourceMappingURL=apollo-orbit.angular.batch-http.mjs.map