import { GraphQLSchema } from 'graphql';
import { ApolloLink } from 'apollo-link';
import { Map } from 'immutable';
export interface TracingSchemaTuple {
    schema: GraphQLSchema;
    tracingSupported: boolean;
}
export interface SchemaFetchProps {
    endpoint: string;
    headers?: string;
}
export declare type LinkGetter = (session: SchemaFetchProps) => {
    link: ApolloLink;
};
export declare class SchemaFetcher {
    cache: Map<string, TracingSchemaTuple>;
    linkGetter: LinkGetter;
    constructor(linkGetter: LinkGetter);
    fetch(session: SchemaFetchProps): Promise<TracingSchemaTuple | {
        schema: GraphQLSchema;
        tracingSupported: boolean;
    } | null>;
    refetch(session: SchemaFetchProps): Promise<{
        schema: GraphQLSchema;
        tracingSupported: boolean;
    } | null>;
    hash(session: SchemaFetchProps): string;
    private fetchSchema(session);
}
