Skip to content

Commit 1325427

Browse files
committed
chore: refresh schema
1 parent 257c97a commit 1325427

File tree

2 files changed

+83
-4
lines changed

2 files changed

+83
-4
lines changed

gql/graphql.ts

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,6 @@ export type Mutation = {
427427
updateScopeSet?: Maybe<ScopeSet>;
428428
/** Update the information of a user. */
429429
updateUser?: Maybe<User>;
430-
/** Verify the registration of this user. */
431-
verifyRegistration: Scalars['Boolean']['output'];
432430
};
433431

434432

@@ -690,6 +688,8 @@ export type Query = {
690688
/** Get a question by ID. */
691689
question: Question;
692690
questions: QuestionConnection;
691+
/** Get the ranking. */
692+
ranking: RankingConnection;
693693
/** Get a scope set by ID or slug. */
694694
scopeSet: ScopeSet;
695695
scopeSets: Array<ScopeSet>;
@@ -772,6 +772,13 @@ export type QueryQuestionsArgs = {
772772
};
773773

774774

775+
export type QueryRankingArgs = {
776+
after?: InputMaybe<Scalars['Cursor']['input']>;
777+
filter: RankingFilter;
778+
first?: InputMaybe<Scalars['Int']['input']>;
779+
};
780+
781+
775782
export type QueryScopeSetArgs = {
776783
filter: ScopeSetFilter;
777784
};
@@ -970,6 +977,41 @@ export type QuestionWhereInput = {
970977
titleNotIn?: InputMaybe<Array<Scalars['String']['input']>>;
971978
};
972979

980+
export enum RankingBy {
981+
CompletedQuestions = 'COMPLETED_QUESTIONS',
982+
Points = 'POINTS'
983+
}
984+
985+
export type RankingConnection = {
986+
__typename?: 'RankingConnection';
987+
edges: Array<RankingEdge>;
988+
pageInfo: PageInfo;
989+
totalCount: Scalars['Int']['output'];
990+
};
991+
992+
export type RankingEdge = {
993+
__typename?: 'RankingEdge';
994+
cursor: Scalars['Cursor']['output'];
995+
node: User;
996+
score: Scalars['Int']['output'];
997+
};
998+
999+
export type RankingFilter = {
1000+
by: RankingBy;
1001+
order: RankingOrder;
1002+
period: RankingPeriod;
1003+
};
1004+
1005+
export enum RankingOrder {
1006+
Asc = 'ASC',
1007+
Desc = 'DESC'
1008+
}
1009+
1010+
export enum RankingPeriod {
1011+
Daily = 'DAILY',
1012+
Weekly = 'WEEKLY'
1013+
}
1014+
9731015
export type SqlExecutionResult = {
9741016
__typename?: 'SQLExecutionResult';
9751017
columns: Array<Scalars['String']['output']>;
@@ -1225,6 +1267,8 @@ export type UpdateGroupInput = {
12251267
*/
12261268
export type UpdateQuestionInput = {
12271269
addSubmissionIDs?: InputMaybe<Array<Scalars['ID']['input']>>;
1270+
/** Question category, e.g. 'query' */
1271+
category?: InputMaybe<Scalars['String']['input']>;
12281272
clearSubmissions?: InputMaybe<Scalars['Boolean']['input']>;
12291273
databaseID?: InputMaybe<Scalars['ID']['input']>;
12301274
/** Question stem */

schema.graphql

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,6 @@ type Mutation {
422422
updateScopeSet(id: ID!, input: UpdateScopeSetInput!): ScopeSet
423423
"""Update the information of a user."""
424424
updateUser(id: ID!, input: UpdateUserInput!): User
425-
"""Verify the registration of this user."""
426-
verifyRegistration: Boolean!
427425
}
428426

429427
"""
@@ -637,6 +635,8 @@ type Query {
637635
"""Filtering options for Questions returned from the connection."""
638636
where: QuestionWhereInput
639637
): QuestionConnection!
638+
"""Get the ranking."""
639+
ranking(after: Cursor, filter: RankingFilter!, first: Int): RankingConnection!
640640
"""Get a scope set by ID or slug."""
641641
scopeSet(filter: ScopeSetFilter!): ScopeSet!
642642
scopeSets: [ScopeSet!]!
@@ -851,6 +851,39 @@ input QuestionWhereInput {
851851
titleNotIn: [String!]
852852
}
853853

854+
enum RankingBy {
855+
COMPLETED_QUESTIONS
856+
POINTS
857+
}
858+
859+
type RankingConnection {
860+
edges: [RankingEdge!]!
861+
pageInfo: PageInfo!
862+
totalCount: Int!
863+
}
864+
865+
type RankingEdge {
866+
cursor: Cursor!
867+
node: User!
868+
score: Int!
869+
}
870+
871+
input RankingFilter {
872+
by: RankingBy!
873+
order: RankingOrder!
874+
period: RankingPeriod!
875+
}
876+
877+
enum RankingOrder {
878+
ASC
879+
DESC
880+
}
881+
882+
enum RankingPeriod {
883+
DAILY
884+
WEEKLY
885+
}
886+
854887
type SQLExecutionResult {
855888
columns: [String!]!
856889
rows: [[String!]!]!
@@ -1101,6 +1134,8 @@ Input was generated by ent.
11011134
"""
11021135
input UpdateQuestionInput {
11031136
addSubmissionIDs: [ID!]
1137+
"""Question category, e.g. 'query'"""
1138+
category: String
11041139
clearSubmissions: Boolean
11051140
databaseID: ID
11061141
"""Question stem"""

0 commit comments

Comments
 (0)