Skip to content

Commit

Permalink
Merge pull request #3 from Harman-singh-waraich/fix/add-headers-to-su…
Browse files Browse the repository at this point in the history
…bgraph-fetch-query

fix: add-headers-to-subgraph-fetch-query-and-update-example-env
  • Loading branch information
jaybuidl committed Jun 12, 2024
2 parents 5829722 + ffad230 commit 0ce3c25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SUBGRAPH_URL=https://api.thegraph.com/subgraphs/name/greenlucid/legacy-curate-xdai
SUBGRAPH_URL=https://api.studio.thegraph.com/query/61738/legacy-curate-gnosis/version/latest
MAIN_LIST_ADDRESS=0x2442D40B0aeCad0298C2724A97F2f1BbDF2C2615
CLASSIC_VIEW=0x27BC296DC0b8a6c3cD39326aE9EC14604e96f7BF
LIGHT_VIEW=0xB32e38B08FcC7b7610490f764b0F9bFd754dCE53
Expand All @@ -7,7 +7,7 @@ CHAIN_ID=100
NETWORK_NAME=Gnosis
CURRENCY_NAME=xDAI
GTCR_UI_URL=https://curate.kleros.io
IPFS_GATEWAY=https://ipfs.kleros.io/
IPFS_GATEWAY=https://cdn.kleros.link
TWITTER_CONSUMER_KEY=flane
TWITTER_CONSUMER_SECRET=flane
TWITTER_ACCESS_TOKEN=flane
Expand Down
3 changes: 3 additions & 0 deletions src/get-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,9 @@ const getEvents = async (
const response = await fetch(config.SUBGRAPH_URL, {
method: "POST",
body: JSON.stringify({ query: fullQuery }),
headers: {
'Content-Type': 'application/json',
}
})

const { data } = (await response.json()) as any
Expand Down
3 changes: 3 additions & 0 deletions src/utils/main-list-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const getIncluderList = async (tcr: string) => {
const response = (await fetch(config.SUBGRAPH_URL, {
method: "POST",
body: JSON.stringify(subgraphQuery),
headers: {
'Content-Type': 'application/json',
}
})) as any

const { data } = (await response.json()) as any
Expand Down

0 comments on commit 0ce3c25

Please sign in to comment.