Skip to content

Commit 077c01b

Browse files
committed
chore: migrated queries from graphiql to hasura
1 parent 2beda89 commit 077c01b

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

server/src/ext/indexer/queries.ts

+11-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { gql } from 'graphql-request';
22

33
export const getRounds = gql`
44
query Rounds($chainId: Int!, $roundIds: [String!]!) {
5-
rounds(filter: { chainId: { equalTo: $chainId }, id: { in: $roundIds } }) {
5+
rounds(where: { chainId: { _eq: $chainId }, id: { _in: $roundIds } }) {
66
id
77
chainId
88
roundMetadata
@@ -15,15 +15,15 @@ export const getRounds = gql`
1515

1616
export const getRoundsWithApplications = gql`
1717
query RoundsApplications($chainId: Int!, $roundIds: [String!]!) {
18-
rounds(filter: { chainId: { equalTo: $chainId }, id: { in: $roundIds } }) {
18+
rounds(where: { chainId: { _eq: $chainId }, id: { _in: $roundIds } }) {
1919
chainId
2020
id
2121
roundMetadata
2222
roundMetadataCid
2323
donationsStartTime
2424
donationsEndTime
2525
matchTokenAddress
26-
applications(filter: { status: { equalTo: APPROVED } }) {
26+
applications(where: { status: { _eq: APPROVED } }) {
2727
id
2828
anchorAddress
2929
metadata
@@ -32,7 +32,7 @@ export const getRoundsWithApplications = gql`
3232
projectId
3333
totalDonationsCount
3434
totalAmountDonatedInUsd
35-
project: canonicalProject {
35+
project {
3636
metadata
3737
metadataCid
3838
}
@@ -43,14 +43,14 @@ export const getRoundsWithApplications = gql`
4343

4444
export const getRoundsWithApplicationsStatus = gql`
4545
query RoundsWithApplicationsStatus($chainId: Int!, $roundIds: [String!]!) {
46-
rounds(filter: { chainId: { equalTo: $chainId }, id: { in: $roundIds } }) {
46+
rounds(where: { chainId: { _eq: $chainId }, id: { _in: $roundIds } }) {
4747
chainId
4848
id
4949
roundMetadata
5050
roundMetadataCid
5151
donationsStartTime
5252
donationsEndTime
53-
applications(filter: { status: { equalTo: APPROVED } }) {
53+
applications(where: { status: { _eq: APPROVED } }) {
5454
id
5555
anchorAddress
5656
metadata
@@ -59,7 +59,7 @@ export const getRoundsWithApplicationsStatus = gql`
5959
projectId
6060
totalDonationsCount
6161
totalAmountDonatedInUsd
62-
project: canonicalProject {
62+
project {
6363
metadata
6464
metadataCid
6565
}
@@ -70,22 +70,20 @@ export const getRoundsWithApplicationsStatus = gql`
7070

7171
export const getRoundWithApplications = gql`
7272
query RoundApplications($chainId: Int!, $roundId: String!) {
73-
rounds(
74-
filter: { chainId: { equalTo: $chainId }, id: { equalTo: $roundId } }
75-
) {
73+
rounds(where: { chainId: { _eq: $chainId }, id: { _eq: $roundId } }) {
7674
chainId
7775
id
7876
roundMetadata
7977
roundMetadataCid
8078
donationsStartTime
8179
donationsEndTime
82-
applications(filter: { status: { equalTo: APPROVED } }) {
80+
applications(where: { status: { _eq: APPROVED } }) {
8381
id
8482
metadata
8583
metadataCid
8684
status
8785
projectId
88-
project: canonicalProject {
86+
project {
8987
metadata
9088
metadataCid
9189
}
@@ -112,9 +110,7 @@ export const getApplicationWithRound = gql`
112110

113111
export const getRoundMatchingDistributions = gql`
114112
query RoundMatchingDistributions($chainId: Int!, $roundId: String!) {
115-
rounds(
116-
filter: { chainId: { equalTo: $chainId }, id: { equalTo: $roundId } }
117-
) {
113+
rounds(where: { chainId: { _eq: $chainId }, id: { _eq: $roundId } }) {
118114
matchAmount
119115
donationsEndTime
120116
matchingDistribution

0 commit comments

Comments
 (0)