@@ -103,6 +103,18 @@ export type Database = Node & {
103103 /** SQL schema */
104104 schema : Scalars [ 'String' ] [ 'output' ] ;
105105 slug : Scalars [ 'String' ] [ 'output' ] ;
106+ structure : DatabaseStructure ;
107+ } ;
108+
109+ export type DatabaseStructure = {
110+ __typename ?: 'DatabaseStructure' ;
111+ tables : Array < DatabaseTable > ;
112+ } ;
113+
114+ export type DatabaseTable = {
115+ __typename ?: 'DatabaseTable' ;
116+ columns : Array < Scalars [ 'String' ] [ 'output' ] > ;
117+ name : Scalars [ 'String' ] [ 'output' ] ;
106118} ;
107119
108120/**
@@ -796,6 +808,8 @@ export type QueryUsersArgs = {
796808
797809export type Question = Node & {
798810 __typename ?: 'Question' ;
811+ /** Have you tried to solve the question? */
812+ attempted : Scalars [ 'Boolean' ] [ 'output' ] ;
799813 /** Question category, e.g. 'query' */
800814 category : Scalars [ 'String' ] [ 'output' ] ;
801815 database : Database ;
@@ -804,12 +818,28 @@ export type Question = Node & {
804818 /** Question difficulty, e.g. 'easy' */
805819 difficulty : QuestionDifficulty ;
806820 id : Scalars [ 'ID' ] [ 'output' ] ;
821+ /** Get the last submission for this question. */
822+ lastSubmission ?: Maybe < Submission > ;
807823 /** Reference answer */
808824 referenceAnswer : Scalars [ 'String' ] [ 'output' ] ;
809825 referenceAnswerResult : SqlExecutionResult ;
810- submissions ?: Maybe < Array < Submission > > ;
826+ /** Have you solved the question? */
827+ solved : Scalars [ 'Boolean' ] [ 'output' ] ;
828+ submissions : SubmissionConnection ;
811829 /** Question title */
812830 title : Scalars [ 'String' ] [ 'output' ] ;
831+ /** List of your submissions for this question, ordered by submitted at descending. */
832+ userSubmissions : Array < Submission > ;
833+ } ;
834+
835+
836+ export type QuestionSubmissionsArgs = {
837+ after ?: InputMaybe < Scalars [ 'Cursor' ] [ 'input' ] > ;
838+ before ?: InputMaybe < Scalars [ 'Cursor' ] [ 'input' ] > ;
839+ first ?: InputMaybe < Scalars [ 'Int' ] [ 'input' ] > ;
840+ last ?: InputMaybe < Scalars [ 'Int' ] [ 'input' ] > ;
841+ orderBy ?: InputMaybe < SubmissionOrder > ;
842+ where ?: InputMaybe < SubmissionWhereInput > ;
813843} ;
814844
815845/** A connection to a list of items. */
@@ -1019,6 +1049,12 @@ export type ScopeSetWhereInput = {
10191049 slugNotIn ?: InputMaybe < Array < Scalars [ 'String' ] [ 'input' ] > > ;
10201050} ;
10211051
1052+ export type SolvedQuestionByDifficulty = {
1053+ __typename ?: 'SolvedQuestionByDifficulty' ;
1054+ difficulty : QuestionDifficulty ;
1055+ solvedQuestions : Scalars [ 'Int' ] [ 'output' ] ;
1056+ } ;
1057+
10221058export type Submission = Node & {
10231059 __typename ?: 'Submission' ;
10241060 error ?: Maybe < Scalars [ 'String' ] [ 'output' ] > ;
@@ -1070,6 +1106,14 @@ export type SubmissionResult = {
10701106 result ?: Maybe < UserSqlExecutionResult > ;
10711107} ;
10721108
1109+ export type SubmissionStatistics = {
1110+ __typename ?: 'SubmissionStatistics' ;
1111+ attemptedQuestions : Scalars [ 'Int' ] [ 'output' ] ;
1112+ solvedQuestionByDifficulty : Array < SolvedQuestionByDifficulty > ;
1113+ solvedQuestions : Scalars [ 'Int' ] [ 'output' ] ;
1114+ totalQuestions : Scalars [ 'Int' ] [ 'output' ] ;
1115+ } ;
1116+
10731117/** SubmissionStatus is enum for the field status */
10741118export enum SubmissionStatus {
10751119 Failed = 'failed' ,
@@ -1146,10 +1190,6 @@ export type SubmissionWhereInput = {
11461190 submittedCodeNotIn ?: InputMaybe < Array < Scalars [ 'String' ] [ 'input' ] > > ;
11471191} ;
11481192
1149- export type SubmissionsOfQuestionWhereInput = {
1150- status ?: InputMaybe < SubmissionStatus > ;
1151- } ;
1152-
11531193/**
11541194 * UpdateDatabaseInput is used for update Database object.
11551195 * Input was generated by ent.
@@ -1245,9 +1285,8 @@ export type User = Node & {
12451285 impersonatedBy ?: Maybe < User > ;
12461286 name : Scalars [ 'String' ] [ 'output' ] ;
12471287 points : PointConnection ;
1288+ submissionStatistics : SubmissionStatistics ;
12481289 submissions : SubmissionConnection ;
1249- /** Get all submissions of a question. */
1250- submissionsOfQuestion : SubmissionConnection ;
12511290 /** The total points of the user. */
12521291 totalPoints : Scalars [ 'Int' ] [ 'output' ] ;
12531292 updatedAt : Scalars [ 'Time' ] [ 'output' ] ;
@@ -1283,17 +1322,6 @@ export type UserSubmissionsArgs = {
12831322 where ?: InputMaybe < SubmissionWhereInput > ;
12841323} ;
12851324
1286-
1287- export type UserSubmissionsOfQuestionArgs = {
1288- after ?: InputMaybe < Scalars [ 'Cursor' ] [ 'input' ] > ;
1289- before ?: InputMaybe < Scalars [ 'Cursor' ] [ 'input' ] > ;
1290- first ?: InputMaybe < Scalars [ 'Int' ] [ 'input' ] > ;
1291- last ?: InputMaybe < Scalars [ 'Int' ] [ 'input' ] > ;
1292- orderBy ?: InputMaybe < SubmissionOrder > ;
1293- questionID : Scalars [ 'ID' ] [ 'input' ] ;
1294- where ?: InputMaybe < SubmissionsOfQuestionWhereInput > ;
1295- } ;
1296-
12971325/** A connection to a list of items. */
12981326export type UserConnection = {
12991327 __typename ?: 'UserConnection' ;
0 commit comments