@graphql-hive/core
Version:
24 lines • 906 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.js';
type HeadersObject = {
get(name: string): string | null;
};
type PersistedDocuments = {
resolve(documentId: string, context?: {
waitUntil?: (promise: Promise<void> | void) => void;
}): 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