Created
December 13, 2018 19:25
-
-
Save cesargdm/e89cd9fb255b41d6d3e25fdbd11515d4 to your computer and use it in GitHub Desktop.
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 { from } from 'apollo-link' | |
import { HttpLink } from 'apollo-link-http' | |
import { ApolloClient } from 'apollo-client' | |
import { createUploadLink } from 'apollo-upload-client' | |
import apolloAuthMiddleware from 'utils/apollo/authMiddleware' | |
import { GRAPHQL_URI } from 'lib/constants' | |
import clientState, { cache } from 'utils/apollo/clientState' | |
const apolloClient = new ApolloClient({ | |
cache, | |
link: from([ | |
clientState, | |
apolloAuthMiddleware, | |
createUploadLink({ uri: GRAPHQL_URI }), | |
new HttpLink({ uri: GRAPHQL_URI }), | |
]), | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment