diff --git a/packages/apollo-server-core/src/ApolloServer.ts b/packages/apollo-server-core/src/ApolloServer.ts index 5b527783a25..90c6388b5bb 100644 --- a/packages/apollo-server-core/src/ApolloServer.ts +++ b/packages/apollo-server-core/src/ApolloServer.ts @@ -728,7 +728,7 @@ export class ApolloServerBase< // random prefix each time we get a new schema. documentStore: this.config.documentStore === undefined - ? new UnboundedCache() + ? new InMemoryLRUCache() : this.config.documentStore === null ? null : new PrefixingKeyValueCache( diff --git a/packages/apollo-server-core/src/__tests__/documentStore.test.ts b/packages/apollo-server-core/src/__tests__/documentStore.test.ts index 4570f1c89a9..d65a96b298c 100644 --- a/packages/apollo-server-core/src/__tests__/documentStore.test.ts +++ b/packages/apollo-server-core/src/__tests__/documentStore.test.ts @@ -3,7 +3,7 @@ import type { DocumentNode } from 'graphql'; import { ApolloServerBase } from '../ApolloServer'; import assert from 'assert'; -import { UnboundedCache } from '../utils/UnboundedCache'; +import { InMemoryLRUCache } from '@apollo/utils.keyvaluecache'; const typeDefs = gql` type Query { @@ -54,7 +54,7 @@ describe('ApolloServerBase documentStore', () => { const options = await server.graphQLServerOptions(); const embeddedStore = options.documentStore; assert(embeddedStore); - expect(embeddedStore).toBeInstanceOf(UnboundedCache); + expect(embeddedStore).toBeInstanceOf(InMemoryLRUCache); await server.executeOperation(operations.simple.op);