Skip to content

Commit c5877c2

Browse files
committed
fix(web): voting history
1 parent e584b03 commit c5877c2

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

web/src/graphql/generated.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export type ClassicRound = DisputeKitRound & {
430430
tied: Scalars["Boolean"];
431431
totalCommited: Scalars["BigInt"];
432432
totalVoted: Scalars["BigInt"];
433-
votes: Array<ClassicVote>;
433+
votes: Array<Vote>;
434434
winningChoice: Scalars["BigInt"];
435435
};
436436

@@ -444,10 +444,10 @@ export type ClassicRoundContributionsArgs = {
444444

445445
export type ClassicRoundVotesArgs = {
446446
first?: InputMaybe<Scalars["Int"]>;
447-
orderBy?: InputMaybe<ClassicVote_OrderBy>;
447+
orderBy?: InputMaybe<Vote_OrderBy>;
448448
orderDirection?: InputMaybe<OrderDirection>;
449449
skip?: InputMaybe<Scalars["Int"]>;
450-
where?: InputMaybe<ClassicVote_Filter>;
450+
where?: InputMaybe<Vote_Filter>;
451451
};
452452

453453
export type ClassicRound_Filter = {
@@ -529,13 +529,7 @@ export type ClassicRound_Filter = {
529529
totalVoted_lte?: InputMaybe<Scalars["BigInt"]>;
530530
totalVoted_not?: InputMaybe<Scalars["BigInt"]>;
531531
totalVoted_not_in?: InputMaybe<Array<Scalars["BigInt"]>>;
532-
votes?: InputMaybe<Array<Scalars["String"]>>;
533-
votes_?: InputMaybe<ClassicVote_Filter>;
534-
votes_contains?: InputMaybe<Array<Scalars["String"]>>;
535-
votes_contains_nocase?: InputMaybe<Array<Scalars["String"]>>;
536-
votes_not?: InputMaybe<Array<Scalars["String"]>>;
537-
votes_not_contains?: InputMaybe<Array<Scalars["String"]>>;
538-
votes_not_contains_nocase?: InputMaybe<Array<Scalars["String"]>>;
532+
votes_?: InputMaybe<Vote_Filter>;
539533
winningChoice?: InputMaybe<Scalars["BigInt"]>;
540534
winningChoice_gt?: InputMaybe<Scalars["BigInt"]>;
541535
winningChoice_gte?: InputMaybe<Scalars["BigInt"]>;
@@ -1223,6 +1217,15 @@ export enum DisputeKitDispute_OrderBy {
12231217
export type DisputeKitRound = {
12241218
id: Scalars["ID"];
12251219
localDispute: DisputeKitDispute;
1220+
votes: Array<Vote>;
1221+
};
1222+
1223+
export type DisputeKitRoundVotesArgs = {
1224+
first?: InputMaybe<Scalars["Int"]>;
1225+
orderBy?: InputMaybe<Vote_OrderBy>;
1226+
orderDirection?: InputMaybe<OrderDirection>;
1227+
skip?: InputMaybe<Scalars["Int"]>;
1228+
where?: InputMaybe<Vote_Filter>;
12261229
};
12271230

12281231
export type DisputeKitRound_Filter = {
@@ -1257,11 +1260,13 @@ export type DisputeKitRound_Filter = {
12571260
localDispute_not_starts_with_nocase?: InputMaybe<Scalars["String"]>;
12581261
localDispute_starts_with?: InputMaybe<Scalars["String"]>;
12591262
localDispute_starts_with_nocase?: InputMaybe<Scalars["String"]>;
1263+
votes_?: InputMaybe<Vote_Filter>;
12601264
};
12611265

12621266
export enum DisputeKitRound_OrderBy {
12631267
Id = "id",
12641268
LocalDispute = "localDispute",
1269+
Votes = "votes",
12651270
}
12661271

12671272
export type DisputeKit_Filter = {
@@ -3136,6 +3141,11 @@ export type CourtTreeQuery = {
31363141
__typename?: "Court";
31373142
name?: string | null;
31383143
id: string;
3144+
children: Array<{
3145+
__typename?: "Court";
3146+
name?: string | null;
3147+
id: string;
3148+
}>;
31393149
}>;
31403150
}>;
31413151
}>;
@@ -3215,6 +3225,7 @@ export type VotingHistoryQuery = {
32153225
__typename?: "Query";
32163226
dispute?: {
32173227
__typename?: "Dispute";
3228+
id: string;
32183229
rounds: Array<{ __typename?: "Round"; nbVotes: any }>;
32193230
disputeKitDispute?: {
32203231
__typename?: "ClassicDispute";
@@ -3223,9 +3234,9 @@ export type VotingHistoryQuery = {
32233234
totalVoted: any;
32243235
votes: Array<{
32253236
__typename?: "ClassicVote";
3226-
id: string;
32273237
choice: any;
32283238
justification: string;
3239+
id: string;
32293240
juror: { __typename?: "User"; id: string };
32303241
}>;
32313242
}>;

web/src/hooks/queries/useVotingHistory.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type { VotingHistoryQuery };
66
const votingHistoryQuery = gql`
77
query VotingHistory($disputeID: ID!) {
88
dispute(id: $disputeID) {
9+
id
910
rounds {
1011
nbVotes
1112
}
@@ -15,11 +16,13 @@ const votingHistoryQuery = gql`
1516
totalVoted
1617
votes {
1718
id
18-
choice
19-
justification
2019
juror {
2120
id
2221
}
22+
... on ClassicVote {
23+
choice
24+
justification
25+
}
2326
}
2427
}
2528
}

0 commit comments

Comments
 (0)