import { Plugin } from '@envelop/core';
import { Executor, MaybePromise } from '@graphql-tools/utils';
import { schemaFromExecutor } from '@graphql-tools/wrap';
type GraphQLSchema = any;
export interface ExecutorPluginContext {
    schema$?: MaybePromise<GraphQLSchema>;
    schema?: GraphQLSchema;
    schemaSetPromise$?: Promise<void>;
    skipIntrospection: boolean;
}
export type ExecutorPluginOpts = Parameters<typeof schemaFromExecutor>[2] & {
    polling?: number;
    logWarn?(...args: any[]): void;
};
export interface ExecutorPluginExtras {
    invalidateUnifiedGraph: () => void;
    pluginCtx: ExecutorPluginContext;
    ensureSchema(ctx?: any): void;
}
export declare function useExecutor<TPluginContext extends Record<string, any>>(executor: Executor, opts?: ExecutorPluginOpts): Plugin<TPluginContext> & ExecutorPluginExtras;
export {};
