Skip to content

Commit 61f92af

Browse files
committed
throw error when clear method is used
1 parent 6c9e92d commit 61f92af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/http-data-source.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ function apolloKeyValueCacheToKeyv(cache: KeyValueCache): Store<string> {
3737
async get(key: string) {
3838
return cache.get(key);
3939
},
40-
clear() {},
40+
clear() {
41+
throw new Error(
42+
'clear() method is not supported by apollo key value cache'
43+
);
44+
},
4145
async delete(key: string) {
4246
const result = await cache.delete(key);
4347
if (result === false) {

0 commit comments

Comments
 (0)