UNPKG

apollo-angular

Version:

Use your GraphQL data in your Angular app, with the Apollo Client

28 lines (27 loc) 1.14 kB
import { Observable } from 'rxjs'; import { HttpClient } from '@angular/common/http'; import { ApolloLink } from '@apollo/client'; import { ExtractFiles, FetchOptions, HttpRequestOptions, OperationPrinter } from './types'; import * as i0 from "@angular/core"; export declare namespace HttpLink { interface Options extends FetchOptions, HttpRequestOptions { operationPrinter?: OperationPrinter; useGETForQueries?: boolean; extractFiles?: ExtractFiles; } } export declare class HttpLinkHandler extends ApolloLink { private readonly httpClient; private readonly options; requester: (operation: ApolloLink.Operation) => Observable<ApolloLink.Result>; private print; constructor(httpClient: HttpClient, options: HttpLink.Options); request(op: ApolloLink.Operation): Observable<ApolloLink.Result>; } export declare class HttpLink { private readonly httpClient; constructor(httpClient: HttpClient); create(options: HttpLink.Options): HttpLinkHandler; static ɵfac: i0.ɵɵFactoryDeclaration<HttpLink, never>; static ɵprov: i0.ɵɵInjectableDeclaration<HttpLink>; }