@graphql-hive/core
Version:
22 lines • 825 B
text/typescript
import type { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue.cjs';
import { Logger } from '@graphql-hive/logger';
import { HttpCallConfig } from './http-client.cjs';
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