Skip to content

Commit

Permalink
Removed apollo-boost dependency (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz authored Mar 29, 2020
1 parent b4d16b8 commit c70c339
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 32 deletions.
6 changes: 6 additions & 0 deletions .changeset/modern-turkeys-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@keystonejs/demo-project-blog': patch
'@keystonejs/demo-project-meetup': patch
---

Removed apollo-boost dependency and switched the meetup demo to using apollo-upload-client.
1 change: 0 additions & 1 deletion demo-projects/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"@keystonejs/file-adapters": "^6.0.0",
"@keystonejs/keystone": "^7.0.0",
"@keystonejs/oembed-adapters": "^5.1.2",
"apollo-boost": "^0.4.7",
"apollo-cache-inmemory": "^1.6.5",
"apollo-client": "^2.6.8",
"apollo-upload-client": "^12.1.0",
Expand Down
3 changes: 2 additions & 1 deletion demo-projects/meetup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
"@keystonejs/file-adapters": "^6.0.0",
"@keystonejs/keystone": "^7.0.0",
"@keystonejs/session": "^6.0.0",
"apollo-boost": "^0.4.7",
"apollo-cache-inmemory": "^1.6.5",
"apollo-client": "^2.6.8",
"apollo-upload-client": "^12.1.0",
"body-parser": "^1.18.2",
"cross-env": "^7.0.0",
"date-fns": "^1.30.1",
Expand Down
7 changes: 5 additions & 2 deletions demo-projects/meetup/site/lib/initApollo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import fetch from 'isomorphic-unfetch';
import getConfig from 'next/config';
import { ApolloClient, InMemoryCache, HttpLink } from 'apollo-boost';

import { ApolloClient } from 'apollo-client';
import { InMemoryCache } from 'apollo-cache-inmemory';
import { createUploadLink } from 'apollo-upload-client';

const {
publicRuntimeConfig: { serverUrl },
Expand All @@ -13,7 +16,7 @@ function create(initialState, req) {
return new ApolloClient({
connectToDevTools: process.browser,
ssrMode: !process.browser, // Disables forceFetch on the server (so queries are only run once)
link: new HttpLink({
link: createUploadLink({
uri: `${serverUrl}/admin/api`, // Server URL (must be absolute)
credentials: 'same-origin', // Additional fetch() options like `credentials` or `headers`
// Use fetch() polyfill on the server
Expand Down
32 changes: 4 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4350,21 +4350,6 @@ anymatch@^3.0.3, anymatch@~3.1.1:
normalize-path "^3.0.0"
picomatch "^2.0.4"

apollo-boost@^0.4.7:
version "0.4.7"
resolved "https://registry.yarnpkg.com/apollo-boost/-/apollo-boost-0.4.7.tgz#b0680ab0893e3f8b1ab1058dcfa2b00cb6440d79"
integrity sha512-jfc3aqO0vpCV+W662EOG5gq4AH94yIsvSgAUuDvS3o/Z+8Joqn4zGC9CgLCDHusK30mFgtsEgwEe0pZoedohsQ==
dependencies:
apollo-cache "^1.3.4"
apollo-cache-inmemory "^1.6.5"
apollo-client "^2.6.7"
apollo-link "^1.0.6"
apollo-link-error "^1.0.3"
apollo-link-http "^1.3.1"
graphql-tag "^2.4.2"
ts-invariant "^0.4.0"
tslib "^1.10.0"

apollo-cache-control@^0.8.11:
version "0.8.11"
resolved "https://registry.yarnpkg.com/apollo-cache-control/-/apollo-cache-control-0.8.11.tgz#726e4e3c5685bacbf26c8fbba1f41b4e6252c597"
Expand Down Expand Up @@ -4400,7 +4385,7 @@ apollo-cache@^1.3.2:
apollo-utilities "^1.3.2"
tslib "^1.9.3"

apollo-client@^2.6.7, apollo-client@^2.6.8:
apollo-client@^2.6.8:
version "2.6.8"
resolved "https://registry.yarnpkg.com/apollo-client/-/apollo-client-2.6.8.tgz#01cebc18692abf90c6b3806414e081696b0fa537"
integrity sha512-0zvJtAcONiozpa5z5zgou83iEKkBaXhhSSXJebFHRXs100SecDojyUWKjwTtBPn9HbM6o5xrvC5mo9VQ5fgAjw==
Expand Down Expand Up @@ -4469,15 +4454,6 @@ apollo-graphql@^0.4.0:
apollo-env "^0.6.1"
lodash.sortby "^4.7.0"

apollo-link-error@^1.0.3:
version "1.1.8"
resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.8.tgz#3a957b22b843cf6c307d516709cdc42371c9aafe"
integrity sha512-5hbMIBaINWOsZapWgTF8H2X0q3NjrQD/y4HlqDnUeLmT12OqejLasNh+EFE6q37/l28UHQu1/AuyRn15J7gvCA==
dependencies:
apollo-link "^1.2.9"
apollo-link-http-common "^0.2.11"
tslib "^1.9.3"

apollo-link-error@^1.1.12:
version "1.1.12"
resolved "https://registry.yarnpkg.com/apollo-link-error/-/apollo-link-error-1.1.12.tgz#e24487bb3c30af0654047611cda87038afbacbf9"
Expand Down Expand Up @@ -4505,7 +4481,7 @@ apollo-link-http-common@^0.2.14, apollo-link-http-common@^0.2.15:
ts-invariant "^0.4.0"
tslib "^1.9.3"

apollo-link-http@^1.3.1, apollo-link-http@^1.3.2:
apollo-link-http@^1.3.2:
version "1.5.12"
resolved "https://registry.yarnpkg.com/apollo-link-http/-/apollo-link-http-1.5.12.tgz#878d48bf9d8ae091752710529a222c4a5548118e"
integrity sha512-2tS36RIU6OdxzoWYTPrjvDTF2sCrnlaJ6SL7j0ILPn1Lmw4y6YLwKDsv/SWLwtodtVe9v1dLCGKIGMRMM/SdyA==
Expand All @@ -4529,7 +4505,7 @@ [email protected]:
dependencies:
apollo-link "^1.2.2"

apollo-link@^1.0.0, apollo-link@^1.0.6, apollo-link@^1.0.7, apollo-link@^1.2.2, apollo-link@^1.2.3, apollo-link@^1.2.9:
apollo-link@^1.0.0, apollo-link@^1.0.7, apollo-link@^1.2.2, apollo-link@^1.2.3, apollo-link@^1.2.9:
version "1.2.9"
resolved "https://registry.yarnpkg.com/apollo-link/-/apollo-link-1.2.9.tgz#40a8f0b90716ce3fd6beb27b7eae1108b92e0054"
integrity sha512-ZLUwthOFZq4lxchQ2jeBfVqS/UDdcVmmh8aUw6Ar9awZH4r+RgkcDeu2ooFLUfodWE3mZr7wIZuYsBas/MaNVA==
Expand Down Expand Up @@ -11605,7 +11581,7 @@ graphql-subscriptions@^1.0.0:
dependencies:
iterall "^1.2.1"

graphql-tag@^2.10.1, graphql-tag@^2.4.2, graphql-tag@^2.9.2:
graphql-tag@^2.10.1, graphql-tag@^2.9.2:
version "2.10.1"
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.10.1.tgz#10aa41f1cd8fae5373eaf11f1f67260a3cad5e02"
integrity sha512-jApXqWBzNXQ8jYa/HLkZJaVw9jgwNqZkywa2zfFn16Iv1Zb7ELNHkJaXHR7Quvd5SIGsy6Ny7SUKATgnu05uEg==
Expand Down

0 comments on commit c70c339

Please sign in to comment.