From 18cbd772913af326aa52c9cbf9aad05061aae36e Mon Sep 17 00:00:00 2001 From: Kamila Date: Sun, 14 Jul 2024 14:10:13 +0200 Subject: [PATCH] bump apollo package --- admin/package.json | 1 + admin/src/plugins/apolloProvider.js | 11 +++++++---- admin/yarn.lock | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/admin/package.json b/admin/package.json index 1f4011bae..a1fc2483e 100644 --- a/admin/package.json +++ b/admin/package.json @@ -23,6 +23,7 @@ "@babel/node": "^7.15.8", "@babel/preset-env": "^7.15.8", "@vitejs/plugin-vue": "3.2.0", + "@vue/apollo-composable": "^4.0.2", "@vue/apollo-option": "^4.0.0", "@vue/cli-plugin-unit-jest": "~5.0.8", "@vue/compat": "3.4.31", diff --git a/admin/src/plugins/apolloProvider.js b/admin/src/plugins/apolloProvider.js index e50d3857f..5d683d31a 100644 --- a/admin/src/plugins/apolloProvider.js +++ b/admin/src/plugins/apolloProvider.js @@ -1,9 +1,10 @@ -import { ApolloClient, ApolloLink, InMemoryCache, createHttpLink } from '@apollo/client/core' -import { createApolloProvider } from '@vue/apollo-option' +import { ApolloClient, ApolloLink, InMemoryCache, HttpLink } from 'apollo-boost' +import VueApollo from 'vue-apollo' import CONFIG from '../config' import store from '../store/store' +import { provideApolloClient } from '@vue/apollo-composable' -const httpLink = createHttpLink({ uri: CONFIG.GRAPHQL_URI }) +const httpLink = new HttpLink({ uri: CONFIG.GRAPHQL_URI }) const authLink = new ApolloLink((operation, forward) => { const token = store.state.token @@ -30,6 +31,8 @@ const apolloClient = new ApolloClient({ cache: new InMemoryCache(), }) -export const apolloProvider = createApolloProvider({ +provideApolloClient(apolloClient) + +export const apolloProvider = new VueApollo({ defaultClient: apolloClient, }) diff --git a/admin/yarn.lock b/admin/yarn.lock index 180948919..2d14e4880 100644 --- a/admin/yarn.lock +++ b/admin/yarn.lock @@ -2189,6 +2189,15 @@ resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz#a1484089dd85d6528f435743f84cdd0d215bbb54" integrity sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw== +"@vue/apollo-composable@^4.0.2": + version "4.0.2" + resolved "https://registry.yarnpkg.com/@vue/apollo-composable/-/apollo-composable-4.0.2.tgz#ea3c001d25b3bf659aad5ae7a849fed3928aaa35" + integrity sha512-/yfEktliXw+oMy/6n9C0J05woYoKlM+kcffVXMh0qljbXdrioyj0WkR/LgPdpnRf6TglFnjIgCKKicd5Gyzpnw== + dependencies: + throttle-debounce "^5.0.0" + ts-essentials "^9.4.0" + vue-demi "^0.14.6" + "@vue/apollo-option@^4.0.0": version "4.0.0" resolved "https://registry.yarnpkg.com/@vue/apollo-option/-/apollo-option-4.0.0.tgz#4fbbb7b1b17961e500ae439a90f7c2c8d82e8928" @@ -9546,6 +9555,11 @@ trim-newlines@^3.0.0: resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== +ts-essentials@^9.4.0: + version "9.4.2" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-9.4.2.tgz#6d4bd23b46b61bf3e031816cc887e839eb62c33c" + integrity sha512-mB/cDhOvD7pg3YCLk2rOtejHjjdSi9in/IBYE13S+8WA5FBSraYf4V/ws55uvs0IvQ/l0wBOlXy5yBNZ9Bl8ZQ== + ts-invariant@^0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.10.3.tgz#3e048ff96e91459ffca01304dbc7f61c1f642f6c" @@ -9877,7 +9891,7 @@ vue-apollo@3.1.2: serialize-javascript "^4.0.0" throttle-debounce "^2.1.0" -vue-demi@>=0.13.0, vue-demi@>=0.14.8: +vue-demi@>=0.13.0, vue-demi@>=0.14.8, vue-demi@^0.14.6: version "0.14.8" resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.8.tgz#00335e9317b45e4a68d3528aaf58e0cec3d5640a" integrity sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==