1 | import { DataSourceConfig } from "apollo-datasource";
|
2 | import { GraphQLRequest } from "apollo-link";
|
3 | import { GraphQLError } from "graphql";
|
4 | export interface GraphQLResponse<T> {
|
5 | data?: T;
|
6 | errors?: GraphQLError[];
|
7 | }
|
8 | export declare class GraphQLDataSource<TContext = any> {
|
9 | baseURL: string;
|
10 | context: TContext;
|
11 | initialize(config: DataSourceConfig<TContext>): void;
|
12 | execute<T>(operation: GraphQLRequest): Promise<GraphQLResponse<T>>;
|
13 | protected willSendRequest?(request: any): any;
|
14 | private composeLinks;
|
15 | private didEncounterError;
|
16 | private executeSingleOperation;
|
17 | private resolveUri;
|
18 | private onRequestLink;
|
19 | private onErrorLink;
|
20 | }
|
21 |
|
\ | No newline at end of file |