@graphql-hive/core
Version:
13 lines • 545 B
text/typescript
import type { SamplingContext } from './types.cjs';
/**
* Every operation is reported at least once, but every next occurrence is decided by the sampler.
*/
export declare function atLeastOnceSampler(config: {
/**
* Produces a unique key for a given GraphQL request.
* This key is used to determine the uniqueness of a GraphQL operation.
*/
keyFn(context: SamplingContext): string;
sampler(context: SamplingContext): number | boolean;
}): (context: SamplingContext) => boolean;
//# sourceMappingURL=samplers.d.ts.map