UNPKG

graphql-yoga

Version:

[![GraphQL Conf 2023](/GraphQLConf-2023-Banner.png)](https://graphql.org/conf/)

14 lines (13 loc) 536 B
import type { DocumentNode, validate } from 'graphql'; import type { Plugin } from './types.js'; interface Cache<T> { get(key: string): T | undefined; set(key: string, value: T): void; } export interface ParserAndValidationCacheOptions { documentCache?: Cache<DocumentNode>; errorCache?: Cache<unknown>; validationCache?: boolean | Cache<typeof validate>; } export declare function useParserAndValidationCache({ documentCache, errorCache, validationCache, }: ParserAndValidationCacheOptions): Plugin<{}>; export {};