UNPKG

@apollo-orbit/angular

Version:

A fully-featured GraphQL client for Angular with modular state management.

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