Skip to content

Commit e002bc0

Browse files
committed
feat: add vue apollo
1 parent 7f25aa8 commit e002bc0

File tree

3 files changed

+81
-49
lines changed

3 files changed

+81
-49
lines changed

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,16 @@
1818
"typings": "types/index.d.ts",
1919
"peerDependencies": {},
2020
"dependencies": {
21-
"@types/node": "^13.9.1",
22-
"apollo-boost": "^0.4.7",
23-
"cookie-universal": "^2.1.1",
24-
"graphql": "^14.6.0",
21+
"@types/node": "^14.0.10",
22+
"apollo-boost": "^0.4.9",
23+
"cookie-universal": "^2.1.4",
24+
"graphql": "^15.0.0",
2525
"isomorphic-fetch": "^2.2.1",
2626
"lodash": "^4.17.15",
2727
"vue": "^2.6.11",
28+
"vue-apollo": "^3.0.3",
2829
"vue-graphql-loader": "^0.3.3",
29-
"vue-i18n": "^8.15.5",
30-
"vuefront": "^0.3.5"
30+
"vue-i18n": "^8.18.1",
31+
"vuefront": "^0.3.7"
3132
}
3233
}

src/plugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Vue from 'vue'
22
import VueI18n from 'vue-i18n'
3+
import VueApollo from 'vue-apollo'
34
import ApolloClient from "apollo-boost";
45
import _ from 'lodash'
56
import 'isomorphic-fetch'
@@ -62,8 +63,9 @@ export const init = (ctx, inject) => {
6263
});
6364
}
6465
});
66+
Vue.use(VueApollo)
6567

66-
inject('vfapollo', client)
68+
inject('vfapollo', client)
6769
}
6870

6971
function loadLocaleMessages(options) {

yarn.lock

Lines changed: 71 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.4.tgz#76c3cb3a12909510f52e5dc04a6298cdf9504ffd"
3939
integrity sha512-oVeL12C6gQS/GAExndigSaLxTrKpQPxewx9bOcwfvJiJge4rr7wNaph4J+ns5hrmIV2as5qxqN8YKthn9qh0jw==
4040

41-
"@types/node@^13.9.1":
42-
version "13.9.1"
43-
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.1.tgz#96f606f8cd67fb018847d9b61e93997dabdefc72"
44-
integrity sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ==
41+
"@types/node@^14.0.10":
42+
version "14.0.10"
43+
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.10.tgz#dbfaa170bd9eafccccb6d7060743a761b0844afd"
44+
integrity sha512-Bz23oN/5bi0rniKT24ExLf4cK0JdvN3dH/3k0whYkdN4eI4vS2ZW/2ENNn2uxHCzWcbdHIa/GRuWQytfzCjRYw==
4545

4646
"@types/zen-observable@^0.8.0":
4747
version "0.8.0"
@@ -111,49 +111,49 @@ anymatch@^1.3.0:
111111
micromatch "^2.1.5"
112112
normalize-path "^2.0.0"
113113

114-
apollo-boost@^0.4.7:
115-
version "0.4.7"
116-
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.4.7.tgz#b0680ab0893e3f8b1ab1058dcfa2b00cb6440d79"
117-
integrity sha512-jfc3aqO0vpCV+W662EOG5gq4AH94yIsvSgAUuDvS3o/Z+8Joqn4zGC9CgLCDHusK30mFgtsEgwEe0pZoedohsQ==
114+
apollo-boost@^0.4.9:
115+
version "0.4.9"
116+
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.4.9.tgz#ab3ba539c2ca944e6fd156583a1b1954b17a6791"
117+
integrity sha512-05y5BKcDaa8w47f8d81UVwKqrAjn8uKLv6QM9fNdldoNzQ+rnOHgFlnrySUZRz9QIT3vPftQkEz2UEASp1Mi5g==
118118
dependencies:
119-
apollo-cache "^1.3.4"
120-
apollo-cache-inmemory "^1.6.5"
121-
apollo-client "^2.6.7"
119+
apollo-cache "^1.3.5"
120+
apollo-cache-inmemory "^1.6.6"
121+
apollo-client "^2.6.10"
122122
apollo-link "^1.0.6"
123123
apollo-link-error "^1.0.3"
124124
apollo-link-http "^1.3.1"
125125
graphql-tag "^2.4.2"
126126
ts-invariant "^0.4.0"
127127
tslib "^1.10.0"
128128

129-
apollo-cache-inmemory@^1.6.5:
130-
version "1.6.5"
131-
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.5.tgz#2ccaa3827686f6ed7fb634203dbf2b8d7015856a"
132-
integrity sha512-koB76JUDJaycfejHmrXBbWIN9pRKM0Z9CJGQcBzIOtmte1JhEBSuzsOUu7NQgiXKYI4iGoMREcnaWffsosZynA==
129+
apollo-cache-inmemory@^1.6.6:
130+
version "1.6.6"
131+
resolved "https://registry.yarnpkg.com/apollo-cache-inmemory/-/apollo-cache-inmemory-1.6.6.tgz#56d1f2a463a6b9db32e9fa990af16d2a008206fd"
132+
integrity sha512-L8pToTW/+Xru2FFAhkZ1OA9q4V4nuvfoPecBM34DecAugUZEBhI2Hmpgnzq2hTKZ60LAMrlqiASm0aqAY6F8/A==
133133
dependencies:
134-
apollo-cache "^1.3.4"
135-
apollo-utilities "^1.3.3"
134+
apollo-cache "^1.3.5"
135+
apollo-utilities "^1.3.4"
136136
optimism "^0.10.0"
137137
ts-invariant "^0.4.0"
138138
tslib "^1.10.0"
139139

140-
apollo-cache@1.3.4, apollo-cache@^1.3.4:
141-
version "1.3.4"
142-
resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.4.tgz#0c9f63c793e1cd6e34c450f7668e77aff58c9a42"
143-
integrity sha512-7X5aGbqaOWYG+SSkCzJNHTz2ZKDcyRwtmvW4mGVLRqdQs+HxfXS4dUS2CcwrAj449se6tZ6NLUMnjko4KMt3KA==
140+
apollo-cache@1.3.5, apollo-cache@^1.3.5:
141+
version "1.3.5"
142+
resolved "https://registry.yarnpkg.com/apollo-cache/-/apollo-cache-1.3.5.tgz#9dbebfc8dbe8fe7f97ba568a224bca2c5d81f461"
143+
integrity sha512-1XoDy8kJnyWY/i/+gLTEbYLnoiVtS8y7ikBr/IfmML4Qb+CM7dEEbIUOjnY716WqmZ/UpXIxTfJsY7rMcqiCXA==
144144
dependencies:
145-
apollo-utilities "^1.3.3"
145+
apollo-utilities "^1.3.4"
146146
tslib "^1.10.0"
147147

148-
apollo-client@^2.6.7:
149-
version "2.6.8"
150-
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.8.tgz#01cebc18692abf90c6b3806414e081696b0fa537"
151-
integrity sha512-0zvJtAcONiozpa5z5zgou83iEKkBaXhhSSXJebFHRXs100SecDojyUWKjwTtBPn9HbM6o5xrvC5mo9VQ5fgAjw==
148+
apollo-client@^2.6.10:
149+
version "2.6.10"
150+
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.10.tgz#86637047b51d940c8eaa771a4ce1b02df16bea6a"
151+
integrity sha512-jiPlMTN6/5CjZpJOkGeUV0mb4zxx33uXWdj/xQCfAMkuNAC3HN7CvYDyMHHEzmcQ5GV12LszWoQ/VlxET24CtA==
152152
dependencies:
153153
"@types/zen-observable" "^0.8.0"
154-
apollo-cache "1.3.4"
154+
apollo-cache "1.3.5"
155155
apollo-link "^1.0.0"
156-
apollo-utilities "1.3.3"
156+
apollo-utilities "1.3.4"
157157
symbol-observable "^1.0.2"
158158
ts-invariant "^0.4.0"
159159
tslib "^1.10.0"
@@ -196,7 +196,17 @@ apollo-link@^1.0.0, apollo-link@^1.0.6, apollo-link@^1.2.13:
196196
tslib "^1.9.3"
197197
zen-observable-ts "^0.8.20"
198198

199-
apollo-utilities@1.3.3, apollo-utilities@^1.3.0, apollo-utilities@^1.3.3:
199+
apollo-utilities@1.3.4, apollo-utilities@^1.3.4:
200+
version "1.3.4"
201+
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.4.tgz#6129e438e8be201b6c55b0f13ce49d2c7175c9cf"
202+
integrity sha512-pk2hiWrCXMAy2fRPwEyhvka+mqwzeP60Jr1tRYi5xru+3ko94HI9o6lK0CT33/w4RDlxWchmdhDCrvdr+pHCig==
203+
dependencies:
204+
"@wry/equality" "^0.1.2"
205+
fast-json-stable-stringify "^2.0.0"
206+
ts-invariant "^0.4.0"
207+
tslib "^1.10.0"
208+
209+
apollo-utilities@^1.3.0:
200210
version "1.3.3"
201211
resolved "https://registry.yarnpkg.com/apollo-utilities/-/apollo-utilities-1.3.3.tgz#f1854715a7be80cd810bc3ac95df085815c0787c"
202212
integrity sha512-F14aX2R/fKNYMvhuP2t9GD9fggID7zp5I96MF5QeKYWDWTrkRdHRp4+SVfXUVN+cXOaB/IebfvRtzPf25CM0zw==
@@ -540,10 +550,10 @@ consola@^2.10.1:
540550
resolved "https://registry.yarnpkg.com/consola/-/consola-2.11.3.tgz#f7315836224c143ac5094b47fd4c816c2cd1560e"
541551
integrity sha512-aoW0YIIAmeftGR8GSpw6CGQluNdkWMWh3yEFjH/hmynTYnMtibXszii3lxCXmk8YxJtI3FAK5aTiquA5VH68Gw==
542552

543-
cookie-universal@^2.1.1:
544-
version "2.1.1"
545-
resolved "https://registry.yarnpkg.com/cookie-universal/-/cookie-universal-2.1.1.tgz#d9b8d27ceb5d7a6a57481eb5a3b58995cf1a1a40"
546-
integrity sha512-WolLEtABR5E6NLIgpgP0LT53C85iJmxqTF3YAx4tCIWl0mkwivzjQaVbXDQbUxKz4HRwiYLW1D8vh1SJIAkl8A==
553+
cookie-universal@^2.1.4:
554+
version "2.1.4"
555+
resolved "https://registry.yarnpkg.com/cookie-universal/-/cookie-universal-2.1.4.tgz#826a273da7eb9b08bfb0139bae12ea70770d564b"
556+
integrity sha512-dwWXs7NGBzaBYDypu3jWH5M3NJW+zu5QdyJkFMHJvhLuyL4/eXG4105fwtTDwfIqyTunwVvQX4PHdtfPDS7URQ==
547557
dependencies:
548558
"@types/cookie" "^0.3.3"
549559
cookie "^0.4.0"
@@ -954,6 +964,11 @@ graphql@^14.0.0-rc.1, graphql@^14.6.0:
954964
dependencies:
955965
iterall "^1.2.2"
956966

967+
graphql@^15.0.0:
968+
version "15.0.0"
969+
resolved "https://registry.yarnpkg.com/graphql/-/graphql-15.0.0.tgz#042a5eb5e2506a2e2111ce41eb446a8e570b8be9"
970+
integrity sha512-ZyVO1xIF9F+4cxfkdhOJINM+51B06Friuv4M66W7HzUOeFd+vNzUn4vtswYINPi6sysjf1M2Ri/rwZALqgwbaQ==
971+
957972
hammerjs@^2.0.8:
958973
version "2.0.8"
959974
resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1"
@@ -1974,7 +1989,7 @@ semver@^6.0.0:
19741989
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
19751990
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
19761991

1977-
serialize-javascript@^2.1.2:
1992+
serialize-javascript@^2.1.0, serialize-javascript@^2.1.2:
19781993
version "2.1.2"
19791994
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.2.tgz#ecec53b0e0317bdc95ef76ab7074b7384785fa61"
19801995
integrity sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==
@@ -2207,6 +2222,11 @@ terser@^4.4.3:
22072222
source-map "~0.6.1"
22082223
source-map-support "~0.5.12"
22092224

2225+
throttle-debounce@^2.1.0:
2226+
version "2.1.0"
2227+
resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.1.0.tgz#257e648f0a56bd9e54fe0f132c4ab8611df4e1d5"
2228+
integrity sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg==
2229+
22102230
to-object-path@^0.3.0:
22112231
version "0.3.0"
22122232
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -2306,6 +2326,15 @@ validate-npm-package-license@^3.0.1:
23062326
spdx-correct "^3.0.0"
23072327
spdx-expression-parse "^3.0.0"
23082328

2329+
vue-apollo@^3.0.3:
2330+
version "3.0.3"
2331+
resolved "https://registry.yarnpkg.com/vue-apollo/-/vue-apollo-3.0.3.tgz#7f29558df76eec0f03251847eef153816a261827"
2332+
integrity sha512-WJaQ1v/i46/oIPlKv7J0Tx6tTlbuaeCdhrAbL06h+Zca2gzr5ywjUFpl8ijMTGJsQ+Ph/U4xEpBFBOMxQmL+7g==
2333+
dependencies:
2334+
chalk "^2.4.2"
2335+
serialize-javascript "^2.1.0"
2336+
throttle-debounce "^2.1.0"
2337+
23092338
vue-functional-data-merge@^3.1.0:
23102339
version "3.1.0"
23112340
resolved "https://registry.yarnpkg.com/vue-functional-data-merge/-/vue-functional-data-merge-3.1.0.tgz#08a7797583b7f35680587f8a1d51d729aa1dc657"
@@ -2320,10 +2349,10 @@ vue-graphql-loader@^0.3.3:
23202349
graphql-tag "^2.4.2"
23212350
loader-utils "^1.1.0"
23222351

2323-
vue-i18n@^8.15.5:
2324-
version "8.15.5"
2325-
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.15.5.tgz#e39e4724c88ec38ef72217de325e8b10a35718cf"
2326-
integrity sha512-lIej02+w8lP0k1PEN1xtXqKpQ1hDh17zvDF+7Oc2qJi+cTMDlfPM771w4euVaHO67AxEz4WL9MIgkyn3tkeCtQ==
2352+
vue-i18n@^8.18.1:
2353+
version "8.18.1"
2354+
resolved "https://registry.yarnpkg.com/vue-i18n/-/vue-i18n-8.18.1.tgz#2e683ac93a15617bdcd210f99359d6034e8425dd"
2355+
integrity sha512-K+hFQJksF8Ph23pnhbwSyoQx+4Y1q/rh2o7GiXI/3rLCCrwanUbzudC8+trp0Mb8rn9y83DYF6RXNrMd+VsuCw==
23272356

23282357
vue-image-lightbox@^7.0.0:
23292358
version "7.0.0"
@@ -2346,10 +2375,10 @@ vue@^2.6.11:
23462375
resolved "https://registry.yarnpkg.com/vue/-/vue-2.6.11.tgz#76594d877d4b12234406e84e35275c6d514125c5"
23472376
integrity sha512-VfPwgcGABbGAue9+sfrD4PuwFar7gPb1yl1UK1MwXoQPAw0BKSqWfoYCT/ThFrdEVWoI51dBuyCoiNU9bZDZxQ==
23482377

2349-
vuefront@^0.3.5:
2350-
version "0.3.5"
2351-
resolved "https://registry.yarnpkg.com/vuefront/-/vuefront-0.3.5.tgz#887f1dab9e07c207e92d9bfbd8c4496d7c6c17da"
2352-
integrity sha512-kuOTpqj73mmjAE/UxhUIKwpPdCoGqca3cYw+cRegT0f6hXp8+CYKSxBOmSfAWy0z85CXv1+g4XbWVYtZQEdjfA==
2378+
vuefront@^0.3.7:
2379+
version "0.3.7"
2380+
resolved "https://registry.yarnpkg.com/vuefront/-/vuefront-0.3.7.tgz#528754fc39ea58df7c048ee4b483f36b20f1079b"
2381+
integrity sha512-khWIsC6Dg8HjqVCTH2txX6RRz+QFR6X1R7KUzEuI7cjeoJNtxfDyMRJcU/8QR9Nv++kOWGUgm8607r29YDv7Ng==
23532382
dependencies:
23542383
"@babel/standalone" "^7.8.8"
23552384
"@fortawesome/fontawesome-free" "^5.12.1"

0 commit comments

Comments
 (0)