1 | import { GraphQLSchema, GraphQLFieldResolver, DocumentNode, GraphQLError, GraphQLFormattedError } from 'graphql';
|
2 | import { GraphQLExtension } from 'graphql-extensions';
|
3 | import { DataSource } from 'apollo-datasource';
|
4 | import { PersistedQueryOptions } from './graphqlOptions';
|
5 | import { GraphQLRequest, GraphQLResponse, GraphQLRequestContext, GraphQLExecutor, InvalidGraphQLRequestError, ValidationRule } from 'apollo-server-types';
|
6 | import { ApolloServerPlugin } from 'apollo-server-plugin-base';
|
7 | import { InMemoryLRUCache } from 'apollo-server-caching';
|
8 | import { GraphQLParseOptions } from 'graphql-tools';
|
9 | export { GraphQLRequest, GraphQLResponse, GraphQLRequestContext, InvalidGraphQLRequestError, };
|
10 | export declare const APQ_CACHE_PREFIX = "apq:";
|
11 | export interface GraphQLRequestPipelineConfig<TContext> {
|
12 | schema: GraphQLSchema;
|
13 | rootValue?: ((document: DocumentNode) => any) | any;
|
14 | validationRules?: ValidationRule[];
|
15 | executor?: GraphQLExecutor;
|
16 | fieldResolver?: GraphQLFieldResolver<any, TContext>;
|
17 | dataSources?: () => DataSources<TContext>;
|
18 | extensions?: Array<() => GraphQLExtension>;
|
19 | persistedQueries?: PersistedQueryOptions;
|
20 | formatError?: (error: GraphQLError) => GraphQLFormattedError;
|
21 | formatResponse?: (response: GraphQLResponse, requestContext: GraphQLRequestContext<TContext>) => GraphQLResponse | null;
|
22 | plugins?: ApolloServerPlugin[];
|
23 | documentStore?: InMemoryLRUCache<DocumentNode>;
|
24 | parseOptions?: GraphQLParseOptions;
|
25 | }
|
26 | export declare type DataSources<TContext> = {
|
27 | [name: string]: DataSource<TContext>;
|
28 | };
|
29 | declare type Mutable<T> = {
|
30 | -readonly [P in keyof T]: T[P];
|
31 | };
|
32 | export declare function processGraphQLRequest<TContext>(config: GraphQLRequestPipelineConfig<TContext>, requestContext: Mutable<GraphQLRequestContext<TContext>>): Promise<GraphQLResponse>;
|
33 |
|
\ | No newline at end of file |