@graphql-yoga/plugin-response-cache
Version:
For the documentation check `http://graphql-yoga.com/docs/response-cache`
9 lines (8 loc) • 536 B
text/typescript
import { createInMemoryCache, UseResponseCacheParameter as UseEnvelopResponseCacheParameter } from '@envelop/response-cache';
import { Maybe, Plugin, PromiseOrValue } from 'graphql-yoga';
export type UseResponseCacheParameter = Omit<UseEnvelopResponseCacheParameter, 'getDocumentString' | 'session'> & {
session: (request: Request) => PromiseOrValue<Maybe<string>>;
enabled?: (request: Request) => boolean;
};
export declare function useResponseCache(options: UseResponseCacheParameter): Plugin;
export { createInMemoryCache };