import type { ValidateFunctionParameter } from '@envelop/types'; import type { EZContext } from './index'; import type { EZPlugin } from './types'; export declare type ValidationCacheOptions = { max?: number; ttl?: number; }; export declare type ParserCacheOptions = { max?: number; ttl?: number; }; export interface DisableIntrospectionOptions { disableIf?: (args: { context: EZContext; params: ValidateFunctionParameter; }) => boolean; } export type CacheOptions = boolean | { /** * Enable/Disable or configure cache options * @default true */ parse?: boolean | ParserCacheOptions; /** * Enable/Disable or configure cache options * @default true */ validation?: boolean | ValidationCacheOptions; }; export interface EZIntrospectionOptions { /** * Disable GraphQL Schema introspection */ disable?: { disableIf?: DisableIntrospectionOptions['disableIf']; } | boolean; } declare module './index' { interface AppOptions { /** * Enable/Disable/Configure in-memory cache that improves performance * * `cache === true` => Enable both parse & validation cache * * `cache === false` => Disable caching * * @default false */ cache?: CacheOptions; /** * Enable/Disable/Configure GraphQL Schema introspection */ introspection?: EZIntrospectionOptions; } } export declare const SmartCacheIntrospection: () => NonNullable;