diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-25 18:08:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-25 18:08:05 +0300 |
commit | 4dc41ac252c0bfefb9bc55a8627262cc76c69d5e (patch) | |
tree | 24bd114dee0235c3874d83d57d64abab87b39a3c /app/assets/javascripts/lib | |
parent | ba9892d3c122a4f437b4b38926fb75848deaf097 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/graphql.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/assets/javascripts/lib/graphql.js b/app/assets/javascripts/lib/graphql.js index 451950346b0..4ad979be6e6 100644 --- a/app/assets/javascripts/lib/graphql.js +++ b/app/assets/javascripts/lib/graphql.js @@ -105,7 +105,7 @@ export default (resolvers = {}, config = {}) => { const { baseUrl, batchMax = 10, - cacheConfig, + cacheConfig = { typePolicies: {}, possibleTypes: {} }, fetchPolicy = fetchPolicies.CACHE_FIRST, typeDefs, path = '/api/graphql', @@ -221,9 +221,15 @@ export default (resolvers = {}, config = {}) => { typeDefs, link: appLink, cache: new InMemoryCache({ - typePolicies, - possibleTypes, ...cacheConfig, + typePolicies: { + ...typePolicies, + ...cacheConfig.typePolicies, + }, + possibleTypes: { + ...possibleTypes, + ...cacheConfig.possibleTypes, + }, }), resolvers, defaultOptions: { |