-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joao Pedro da Silva
committed
Jan 24, 2023
1 parent
e2b42be
commit 3fce0fc
Showing
3 changed files
with
129 additions
and
112 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
// To use Apollo Client without a browser, is necessary to polyfill or provide a fetch method. | ||
import 'cross-fetch/polyfill'; | ||
|
||
import ApolloClient, { InMemoryCache } from 'apollo-boost'; | ||
import { fetch } from 'cross-fetch'; | ||
import { ApolloClient, InMemoryCache } from 'apollo-boost'; | ||
import { HttpLink } from 'apollo-link-http'; | ||
|
||
import config from '../config'; | ||
|
||
|
||
export const clientDAO = new ApolloClient({ | ||
uri: config.subgraphUrl, | ||
cache: new InMemoryCache(), | ||
link: new HttpLink({ | ||
uri: config.subgraphUrl, | ||
fetch, | ||
}), | ||
cache: new InMemoryCache() | ||
}); | ||
|
||
export const clientCouncil = new ApolloClient({ | ||
uri: config.councilSubgraphUrl, | ||
cache: new InMemoryCache(), | ||
link: new HttpLink({ | ||
uri: config.councilSubgraphUrl, | ||
fetch, | ||
}), | ||
cache: new InMemoryCache() | ||
}); |
Oops, something went wrong.