-
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.
* add fetch on apollo-boost * fix eslint
- Loading branch information
Joao Pedro da Silva
authored
Jan 24, 2023
1 parent
69cde32
commit 219ede1
Showing
3 changed files
with
126 additions
and
110 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,21 @@ | ||
// 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 { ApolloClient, InMemoryCache } from 'apollo-boost'; | ||
import { HttpLink } from 'apollo-link-http'; | ||
import { fetch } from 'cross-fetch'; | ||
|
||
import config from '../config'; | ||
|
||
export const clientDAO = new ApolloClient({ | ||
uri: config.subgraphUrl, | ||
link: new HttpLink({ | ||
uri: config.subgraphUrl, | ||
fetch, | ||
}), | ||
cache: new InMemoryCache(), | ||
}); | ||
|
||
export const clientCouncil = new ApolloClient({ | ||
uri: config.councilSubgraphUrl, | ||
link: new HttpLink({ | ||
uri: config.councilSubgraphUrl, | ||
fetch, | ||
}), | ||
cache: new InMemoryCache(), | ||
}); |
Oops, something went wrong.