ApolloServer.d.ts 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /// <reference types="node" />
  2. import { Server as HttpServer } from 'http';
  3. import { Http2Server, Http2SecureServer } from 'http2';
  4. import { Server as HttpsServer } from 'https';
  5. import { GraphQLSchema, DocumentNode } from 'graphql';
  6. import { ApolloServerPlugin } from 'apollo-server-plugin-base';
  7. import type WebSocket from 'ws';
  8. import { GraphQLServerOptions } from './graphqlOptions';
  9. import { Config, SubscriptionServerOptions, FileUploadOptions } from './types';
  10. import { PlaygroundRenderPageOptions } from './playground';
  11. import { GraphQLRequest } from './requestPipeline';
  12. export declare class ApolloServerBase {
  13. private logger;
  14. subscriptionsPath?: string;
  15. graphqlPath: string;
  16. requestOptions: Partial<GraphQLServerOptions<any>>;
  17. private context?;
  18. private apolloConfig;
  19. protected plugins: ApolloServerPlugin[];
  20. protected subscriptionServerOptions?: SubscriptionServerOptions;
  21. protected uploadsConfig?: FileUploadOptions;
  22. private disableUploadsIfSchemaDoesNotUseUploadScalar;
  23. private subscriptionServer?;
  24. protected playgroundOptions?: PlaygroundRenderPageOptions;
  25. private parseOptions;
  26. private config;
  27. private state;
  28. protected schema?: GraphQLSchema;
  29. private toDispose;
  30. private toDisposeLast;
  31. private experimental_approximateDocumentStoreMiB;
  32. constructor(config: Config);
  33. setGraphQLPath(path: string): void;
  34. start(): Promise<void>;
  35. protected _start(): Promise<void>;
  36. protected willStart(): Promise<void>;
  37. private ensureStarted;
  38. protected ensureStarting(): void;
  39. private logStartupError;
  40. private startGatewayAndLoadSchema;
  41. private constructSchema;
  42. private generateSchemaDerivedData;
  43. disableUploads(): boolean;
  44. stop(): Promise<void>;
  45. installSubscriptionHandlers(server: HttpServer | HttpsServer | Http2Server | Http2SecureServer | WebSocket.Server): void;
  46. protected supportsSubscriptions(): boolean;
  47. protected supportsUploads(): boolean;
  48. protected serverlessFramework(): boolean;
  49. private ensurePluginInstantiation;
  50. private initializeDocumentStore;
  51. protected graphQLServerOptions(integrationContextArgument?: Record<string, any>): Promise<GraphQLServerOptions>;
  52. executeOperation(request: Omit<GraphQLRequest, 'query'> & {
  53. query?: string | DocumentNode;
  54. }, integrationContextArgument?: Record<string, any>): Promise<import("apollo-server-types").GraphQLResponse>;
  55. }
  56. //# sourceMappingURL=ApolloServer.d.ts.map