Created
September 11, 2019 20:10
-
-
Save pablohpsilva/586520004a3fd8850aca59ff9e8e76ad to your computer and use it in GitHub Desktop.
sample medium client dh-apollo-entities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloClient } from 'apollo-client' | |
import { ApolloLink } from 'apollo-link' | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import { ApiGw, User } from 'dh-apollo-entities' | |
const cache = new InMemoryCache() | |
const ApiGwLink = ApiGw.link({ | |
... | |
}) | |
const UserLink = User.link({ | |
... | |
cache | |
}) | |
export const client = new ApolloClient({ | |
link: ApolloLink.from([ApiGwLink, UserLink]), | |
cache, | |
... | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment