@graphql-hive/core
Version:
22 lines • 823 B
TypeScript
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue.js';
import { Logger } from '@graphql-hive/logger';
import { HttpCallConfig } from './http-client.js';
import type { PersistedDocumentsConfiguration } from './types';
type HeadersObject = {
get(name: string): string | null;
};
type PersistedDocuments = {
resolve(documentId: string): PromiseOrValue<string | null>;
allowArbitraryDocuments(context: {
headers?: HeadersObject;
}): PromiseOrValue<boolean>;
dispose: () => void;
};
export declare function createPersistedDocuments(config: PersistedDocumentsConfiguration & {
logger: Logger;
fetch?: typeof fetch;
retry?: HttpCallConfig['retry'];
timeout?: HttpCallConfig['retry'];
}): PersistedDocuments;
export {};
//# sourceMappingURL=persisted-documents.d.ts.map