Skip to content

Commit

Permalink
Merge pull request #82 from show-karma/fix/thegraph-proxy-parser
Browse files Browse the repository at this point in the history
feat: thegraph proxy parser
  • Loading branch information
Arthh authored Jul 15, 2024
2 parents 318c70b + 952efa9 commit 69b563c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/javascripts/lib/voting-history/gql/fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ function parseBody(body) {

const gql = {
async query(url, query) {
const { data: { data } } = await fetch(url, {
const { data } = await fetch(url, {
body: parseBody({ query }),
method: "POST",
headers: {
"Content-Type": "application/json",
},
}).then(async (res) => await res.json());

const response = data.data;

Check failure on line 16 in assets/javascripts/lib/voting-history/gql/fetcher.js

View workflow job for this annotation

GitHub Actions / build

Trailing spaces not allowed
const response = data?.data?.data || data?.data || data;
return { ...response };
},
};
Expand Down

0 comments on commit 69b563c

Please sign in to comment.