more TS fixes

This commit is contained in:
Emi Matchu 2021-02-02 19:22:47 -08:00
parent cee5e128cb
commit cb87fd8a9a

View file

@ -33,24 +33,6 @@ export interface CacheControlExtensionOptions {
stripFormattedExtensions?: boolean;
}
declare module 'graphql/type/definition' {
interface GraphQLResolveInfo {
// @ts-ignore: FORK. Don't know enough TypeScript to resolve this!
cacheControl: {
setCacheHint: (hint: CacheHint) => void;
cacheHint: CacheHint;
};
}
}
declare module 'apollo-server-types' {
interface GraphQLRequestContext<TContext> {
// Not readonly: plugins can set it.
// @ts-ignore: FORK. Don't know enough TypeScript to resolve this!
overallCachePolicy?: Required<CacheHint> | undefined;
}
}
type MapResponsePathHints = Map<ResponsePath, CacheHint>;
export const plugin = (