Skip to content

Commit

Permalink
Bumping Apollo and React Apollo versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucis committed Mar 12, 2019
1 parent a0b4760 commit e0bdee3
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 117 deletions.
5 changes: 2 additions & 3 deletions react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
"dependencies": {
"@types/react-content-loader": "^3.1.4",
"apollo-cache-inmemory": "^1.2.5",
"apollo-client": "^2.4.12",
"apollo-client": "^2.5.1",
"apollo-link-http": "^1.5.4",
"apollo-link-persisted-queries": "^0.2.1",
"apollo-link-state": "^0.4.2",
"apollo-upload-client": "^8.1.0",
"apollo-utilities": "^1.0.16",
"classnames": "^2.2.5",
Expand All @@ -28,7 +27,7 @@
"prop-types": "^15.6.0",
"qs": "^6.5.1",
"ramda": "^0.26.1",
"react-apollo": "^2.4.1",
"react-apollo": "^2.5.2",
"react-content-loader": "^3.4.2",
"react-helmet": "^5.2.0",
"react-json-view": "^1.19.1",
Expand Down
10 changes: 2 additions & 8 deletions react/utils/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import {omitTypenameLink} from './links/omitVariableTypenameLink'
import {persistedQueryVersionLink} from './links/persistedQueryVersionLink'
import {createUriSwitchLink} from './links/uriSwitchLink'
import {versionSplitterLink} from './links/versionSplitterLink'
import { createStateLink } from './links/stateLink'
import { getGlobalLinkState } from '../linkState'

interface ApolloClientsRegistry {
[key: string]: ApolloClient<NormalizedCacheObject>
Expand Down Expand Up @@ -87,17 +85,12 @@ export const getClient = (runtime: RenderRuntime, baseURI: string, runtimeContex
const uriSwitchLink = createUriSwitchLink(baseURI, workspace)

const cacheLink = cacheControl ? [cachingLink(cacheControl)] : []

const {initialState = {}, resolvers = {}} = getGlobalLinkState()

const stateLink = createStateLink(initialState, resolvers, cache)


const link = ApolloLink.from([
omitTypenameLink,
versionSplitterLink,
runtimeContextLink,
ensureSessionLink,
stateLink,
persistedQueryLink,
persistedQueryVersionLink,
uriSwitchLink,
Expand All @@ -108,6 +101,7 @@ export const getClient = (runtime: RenderRuntime, baseURI: string, runtimeContex
clientsByWorkspace[`${account}/${workspace}`] = new ApolloClient({
cache: canUseDOM ? cache.restore(window.__STATE__) : cache,
link,
resolvers: {},
ssrMode: !canUseDOM,
})
}
Expand Down
13 changes: 0 additions & 13 deletions react/utils/client/links/stateLink.ts

This file was deleted.

37 changes: 0 additions & 37 deletions react/utils/linkState.ts

This file was deleted.

Loading

0 comments on commit e0bdee3

Please sign in to comment.