From cb6ca3870f1de4b796c1d1b4ace0d23cdeb14aed Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Sat, 25 May 2019 16:50:10 +0800 Subject: [PATCH] fix: add default `inMemoryCacheOptions` vue-cli-plugin-apollo now defaults it to null, which won't trigger default parameter fallback, so this triggers another bug in apollo-cache-inmemory 1.6.0 https://github.com/apollographql/apollo-client/blob/787be614419c39db1dc79ac132a18730c8d7af1b/packages/apollo-cache-inmemory/src/inMemoryCache.ts#L136 causing "Cannot read property 'freezeResults' of null" error. (cherry picked from commit ac8b2b3bd1df1534b7b64d61ee7718a9c655da68) --- packages/@vue/cli-ui/src/vue-apollo.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@vue/cli-ui/src/vue-apollo.js b/packages/@vue/cli-ui/src/vue-apollo.js index 604f0ddf2..45c05bf4f 100644 --- a/packages/@vue/cli-ui/src/vue-apollo.js +++ b/packages/@vue/cli-ui/src/vue-apollo.js @@ -24,6 +24,7 @@ if (typeof endpoint === 'undefined') { // Config const options = { + inMemoryCacheOptions: {}, wsEndpoint: endpoint, persisting: false, websocketsOnly: true,