Skip to content

Commit

Permalink
Use subgraph from graph network
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidsi committed Jan 13, 2022
1 parent f583217 commit fc5bf32
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions apollo/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ import isEqual from 'lodash/isEqual'

export const APOLLO_STATE_PROP_NAME = '__APOLLO_STATE__'

const { NEXT_PUBLIC_ROOT_URL = 'http://localhost:3000' } = process.env
const { NEXT_PUBLIC_GRAPH_API_KEY } = process.env

console.log('ENV VARS', process.browser, NEXT_PUBLIC_ROOT_URL)
console.log('ENV VARS', process.browser, NEXT_PUBLIC_GRAPH_API_KEY)

let apolloClient

function createApolloClient() {
return new ApolloClient({
ssrMode: typeof window === 'undefined',
link: new HttpLink({
// uri: `${NEXT_PUBLIC_ROOT_URL}/api/graphql`, // Server URL (must be absolute)
uri: 'https://api.thegraph.com/subgraphs/name/amxx/eip721-subgraph',
uri: `https://gateway.thegraph.com/api/${NEXT_PUBLIC_GRAPH_API_KEY}/subgraphs/id/0x7859821024e633c5dc8a4fcf86fc52e7720ce525-0`,
credentials: 'same-origin', // Additional fetch() options like `credentials` or `headers`
}),
cache: new InMemoryCache({
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2011,9 +2011,9 @@ camelcase@^5.0.0:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==

caniuse-lite@^1.0.30001202, caniuse-lite@^1.0.30001219, caniuse-lite@^1.0.30001228:
version "1.0.30001234"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001234.tgz#8fc2e709e3b0679d7af7f073a1c661155c39b975"
integrity sha512-a3gjUVKkmwLdNysa1xkUAwN2VfJUJyVW47rsi3aCbkRCtbHAfo+rOsCqVw29G6coQ8gzAPb5XBXwiGHwme3isA==
version "1.0.30001299"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001299.tgz"
integrity sha512-iujN4+x7QzqA2NCSrS5VUy+4gLmRd4xv6vbBBsmfVqTx8bLAD8097euLqQgKxSVLvxjSDcvF1T/i9ocgnUFexw==

capital-case@^1.0.4:
version "1.0.4"
Expand Down

0 comments on commit fc5bf32

Please sign in to comment.