diff --git a/src/server/lib/apollo-cache-control-fork.ts b/src/server/lib/apollo-cache-control-fork.ts index e9e6747..04cad60 100644 --- a/src/server/lib/apollo-cache-control-fork.ts +++ b/src/server/lib/apollo-cache-control-fork.ts @@ -122,7 +122,6 @@ export const plugin = ( willSendResponse(requestContext) { const { response, - // @ts-ignore: FORK. Don't know enough TypeScript to resolve this! overallCachePolicy: overallCachePolicyOverride, } = requestContext; @@ -133,12 +132,13 @@ export const plugin = ( // Use the override by default, but if it's not overridden, set our // own computation onto the `requestContext` for other plugins to read. - const overallCachePolicy = + // FORK: I do an `any` cast here to convince Typescript that our + // CacheHint type is compatible with the built-in one. + const overallCachePolicy: Required | undefined = overallCachePolicyOverride || - // @ts-ignore: FORK. Don't know enough TypeScript to resolve this! - (requestContext.overallCachePolicy = computeOverallCachePolicy( + ((requestContext.overallCachePolicy = computeOverallCachePolicy( hints - )); + )) as any); if ( overallCachePolicy &&