import { setContext } from "@apollo/client/link/context" ; import { ApolloClient , InMemoryCache , NormalizedCacheObject , createHttpLink } from "@apollo/client" ; const httpLink = createHttpLink ( { uri : process . env . REACT_APP_STORE_URI } ) ; const middlewareLink = setContext ( ( ) => ( { headers : { "X-Shopify-Storefront-Access-Token" : process . env . REACT_APP_STOREFRONT_TOKEN } } ) ) ; const client = new ApolloClient ( { link : middlewareLink . concat ( httpLink ) , cache : new InMemoryCache ( ) } ) ; export default client ;