diff --git a/packages/apollo-server-caching/src/InMemoryLRUCache.ts b/packages/apollo-server-caching/src/InMemoryLRUCache.ts index 2f3470c2005..719db2ba34a 100644 --- a/packages/apollo-server-caching/src/InMemoryLRUCache.ts +++ b/packages/apollo-server-caching/src/InMemoryLRUCache.ts @@ -6,7 +6,7 @@ export class InMemoryLRUCache implements KeyValueCache { // FIXME: Define reasonable default max size of the cache constructor({ maxSize = Infinity }: { maxSize?: number } = {}) { - this.store = LRU({ + this.store = new LRU({ max: maxSize, length: item => item.length, });