UNPKG

745 BTypeScriptView Raw
1import type { ApolloServerPlugin } from 'apollo-server-plugin-base';
2import type { HiveClient, HivePluginOptions, SupergraphSDLFetcherOptions } from './internal/types';
3export declare function createSupergraphSDLFetcher({ endpoint, key }: SupergraphSDLFetcherOptions): () => Promise<{
4 id: string;
5 supergraphSdl: any;
6}>;
7export declare function createSupergraphManager(options: {
8 pollIntervalInMs?: number;
9} & SupergraphSDLFetcherOptions): {
10 initialize(hooks: {
11 update(supergraphSdl: string): void;
12 }): Promise<{
13 supergraphSdl: string;
14 cleanup?: () => Promise<void>;
15 }>;
16};
17export declare function hiveApollo(clientOrOptions: HiveClient | HivePluginOptions): ApolloServerPlugin;