diff --git a/next-env.d.ts b/next-env.d.ts
index 9bc3dd4..4f11a03 100644
--- a/next-env.d.ts
+++ b/next-env.d.ts
@@ -1,5 +1,4 @@
///
-///
///
// NOTE: This file should not be edited
diff --git a/package.json b/package.json
index 6aad5f9..a02e612 100644
--- a/package.json
+++ b/package.json
@@ -17,14 +17,14 @@
"@material-ui/core": "^4.11.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
- "@sentry/nextjs": "6.16.1",
+ "@sentry/nextjs": "6.17.9",
"clsx": "^1.1.1",
"date-fns": "^2.19.0",
"graphql": "^15.5.0",
"graphql-request": "^3.4.0",
"lodash": "^4.17.21",
"next": "12.1.0",
- "next-plausible": "^3.1.3",
+ "next-plausible": "^3.1.4",
"next-sitemap": "^1.6.25",
"polish-plurals": "^1.1.0",
"react": "17.0.2",
@@ -44,7 +44,7 @@
"babel-eslint": "^10.0.0",
"babel-plugin-transform-imports": "^2.0.0",
"eslint": "^7.5.0",
- "eslint-config-next": "^12.0.0",
+ "eslint-config-next": "^12.1.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
diff --git a/src/libs/graphql/types.ts b/src/libs/graphql/types.ts
index 1919671..f5e06ca 100644
--- a/src/libs/graphql/types.ts
+++ b/src/libs/graphql/types.ts
@@ -1,4 +1,5 @@
export type Maybe = T | null;
+export type InputMaybe = Maybe;
export type Exact = { [K in keyof T]: T[K] };
export type MakeOptional = Omit & { [SubKey in K]?: Maybe };
export type MakeMaybe = Omit & { [SubKey in K]: Maybe };
@@ -13,9 +14,6 @@ export type Scalars = {
Upload: any;
};
-
-
-
export enum Answer {
A = 'a',
B = 'b',
@@ -25,19 +23,19 @@ export enum Answer {
export type Mutation = {
createProfession?: Maybe;
- updateProfession?: Maybe;
- deleteProfessions?: Maybe>;
createQualification?: Maybe;
- updateQualification?: Maybe;
- deleteQualifications?: Maybe>;
createQuestion?: Maybe;
- updateQuestion?: Maybe;
- deleteQuestions?: Maybe>;
createUser?: Maybe;
- updateUser?: Maybe;
- updateManyUsers?: Maybe>;
+ deleteProfessions?: Maybe>;
+ deleteQualifications?: Maybe>;
+ deleteQuestions?: Maybe>;
deleteUsers?: Maybe>;
signIn?: Maybe;
+ updateManyUsers?: Maybe>;
+ updateProfession?: Maybe;
+ updateQualification?: Maybe;
+ updateQuestion?: Maybe;
+ updateUser?: Maybe;
};
@@ -46,25 +44,23 @@ export type MutationCreateProfessionArgs = {
};
-export type MutationUpdateProfessionArgs = {
- id: Scalars['ID'];
- input: ProfessionInput;
+export type MutationCreateQualificationArgs = {
+ input: QualificationInput;
};
-export type MutationDeleteProfessionsArgs = {
- ids: Array;
+export type MutationCreateQuestionArgs = {
+ input: QuestionInput;
};
-export type MutationCreateQualificationArgs = {
- input: QualificationInput;
+export type MutationCreateUserArgs = {
+ input: UserInput;
};
-export type MutationUpdateQualificationArgs = {
- id: Scalars['ID'];
- input: QualificationInput;
+export type MutationDeleteProfessionsArgs = {
+ ids: Array;
};
@@ -73,228 +69,224 @@ export type MutationDeleteQualificationsArgs = {
};
-export type MutationCreateQuestionArgs = {
- input: QuestionInput;
+export type MutationDeleteQuestionsArgs = {
+ ids: Array;
};
-export type MutationUpdateQuestionArgs = {
- id: Scalars['ID'];
- input: QuestionInput;
+export type MutationDeleteUsersArgs = {
+ ids: Array;
};
-export type MutationDeleteQuestionsArgs = {
- ids: Array;
+export type MutationSignInArgs = {
+ email: Scalars['String'];
+ password: Scalars['String'];
+ staySignedIn?: InputMaybe;
};
-export type MutationCreateUserArgs = {
- input: UserInput;
+export type MutationUpdateManyUsersArgs = {
+ ids: Array;
+ input: UpdateManyUsersInput;
};
-export type MutationUpdateUserArgs = {
+export type MutationUpdateProfessionArgs = {
id: Scalars['ID'];
- input: UserInput;
+ input: ProfessionInput;
};
-export type MutationUpdateManyUsersArgs = {
- ids: Array;
- input: UpdateManyUsersInput;
+export type MutationUpdateQualificationArgs = {
+ id: Scalars['ID'];
+ input: QualificationInput;
};
-export type MutationDeleteUsersArgs = {
- ids: Array;
+export type MutationUpdateQuestionArgs = {
+ id: Scalars['ID'];
+ input: QuestionInput;
};
-export type MutationSignInArgs = {
- email: Scalars['String'];
- password: Scalars['String'];
- staySignedIn?: Maybe;
+export type MutationUpdateUserArgs = {
+ id: Scalars['ID'];
+ input: UserInput;
};
export type Profession = {
+ createdAt: Scalars['Time'];
+ description?: Maybe;
id: Scalars['ID'];
- slug: Scalars['String'];
name: Scalars['String'];
- description?: Maybe;
- createdAt: Scalars['Time'];
qualifications: Array;
+ slug: Scalars['String'];
};
export type ProfessionFilter = {
- id?: Maybe>;
- idNEQ?: Maybe>;
- slug?: Maybe>;
- slugNEQ?: Maybe>;
- name?: Maybe>;
- nameNEQ?: Maybe>;
- nameIEQ?: Maybe;
- nameMATCH?: Maybe;
- descriptionIEQ?: Maybe;
- descriptionMATCH?: Maybe;
- qualificationID?: Maybe>;
- createdAt?: Maybe;
- createdAtGT?: Maybe;
- createdAtGTE?: Maybe;
- createdAtLT?: Maybe;
- createdAtLTE?: Maybe;
+ createdAt?: InputMaybe;
+ createdAtGT?: InputMaybe;
+ createdAtGTE?: InputMaybe;
+ createdAtLT?: InputMaybe;
+ createdAtLTE?: InputMaybe;
+ descriptionIEQ?: InputMaybe;
+ descriptionMATCH?: InputMaybe;
+ id?: InputMaybe>;
+ idNEQ?: InputMaybe>;
+ name?: InputMaybe>;
+ nameIEQ?: InputMaybe;
+ nameMATCH?: InputMaybe;
+ nameNEQ?: InputMaybe>;
+ qualificationID?: InputMaybe>;
+ slug?: InputMaybe>;
+ slugNEQ?: InputMaybe>;
};
export type ProfessionInput = {
- name?: Maybe;
- description?: Maybe;
+ description?: InputMaybe;
+ name?: InputMaybe;
};
export type ProfessionList = {
- total: Scalars['Int'];
items?: Maybe>;
+ total: Scalars['Int'];
};
export type Qualification = {
- id: Scalars['ID'];
- slug: Scalars['String'];
- name: Scalars['String'];
code: Scalars['String'];
- formula?: Maybe;
- description?: Maybe;
createdAt: Scalars['Time'];
+ description?: Maybe;
+ formula?: Maybe;
+ id: Scalars['ID'];
+ name: Scalars['String'];
+ slug: Scalars['String'];
};
export type QualificationFilter = {
- id?: Maybe>;
- idNEQ?: Maybe>;
- slug?: Maybe>;
- slugNEQ?: Maybe>;
- formula?: Maybe>;
- formulaNEQ?: Maybe>;
- name?: Maybe>;
- nameNEQ?: Maybe>;
- nameIEQ?: Maybe;
- nameMATCH?: Maybe;
- code?: Maybe>;
- codeNEQ?: Maybe>;
- codeIEQ?: Maybe;
- codeMATCH?: Maybe;
- descriptionIEQ?: Maybe;
- descriptionMATCH?: Maybe;
- professionID?: Maybe>;
- createdAt?: Maybe;
- createdAtGT?: Maybe;
- createdAtGTE?: Maybe;
- createdAtLT?: Maybe;
- createdAtLTE?: Maybe;
- or?: Maybe;
+ code?: InputMaybe>;
+ codeIEQ?: InputMaybe;
+ codeMATCH?: InputMaybe;
+ codeNEQ?: InputMaybe>;
+ createdAt?: InputMaybe;
+ createdAtGT?: InputMaybe;
+ createdAtGTE?: InputMaybe;
+ createdAtLT?: InputMaybe;
+ createdAtLTE?: InputMaybe;
+ descriptionIEQ?: InputMaybe;
+ descriptionMATCH?: InputMaybe;
+ formula?: InputMaybe>;
+ formulaNEQ?: InputMaybe>;
+ id?: InputMaybe>;
+ idNEQ?: InputMaybe>;
+ name?: InputMaybe>;
+ nameIEQ?: InputMaybe;
+ nameMATCH?: InputMaybe;
+ nameNEQ?: InputMaybe>;
+ or?: InputMaybe;
+ professionID?: InputMaybe>;
+ slug?: InputMaybe>;
+ slugNEQ?: InputMaybe>;
};
export type QualificationFilterOr = {
- nameMatch?: Maybe;
- nameIEQ?: Maybe;
- codeMatch?: Maybe;
- codeIEQ?: Maybe;
+ codeIEQ?: InputMaybe;
+ codeMatch?: InputMaybe;
+ nameIEQ?: InputMaybe;
+ nameMatch?: InputMaybe;
};
export type QualificationInput = {
- name?: Maybe;
- description?: Maybe;
- code?: Maybe;
- formula?: Maybe;
- associateProfession?: Maybe>;
- dissociateProfession?: Maybe>;
+ associateProfession?: InputMaybe>;
+ code?: InputMaybe;
+ description?: InputMaybe;
+ dissociateProfession?: InputMaybe>;
+ formula?: InputMaybe;
+ name?: InputMaybe;
};
export type QualificationList = {
- total: Scalars['Int'];
items?: Maybe>;
+ total: Scalars['Int'];
};
export type Query = {
- professions: ProfessionList;
+ generateTest?: Maybe>;
+ me?: Maybe;
profession?: Maybe;
- qualifications: QualificationList;
- similarQualifications: QualificationList;
+ professions: ProfessionList;
qualification?: Maybe;
+ qualifications: QualificationList;
questions: QuestionList;
- generateTest?: Maybe>;
- users: UserList;
+ similarQualifications: QualificationList;
user?: Maybe;
- me?: Maybe;
+ users: UserList;
};
-export type QueryProfessionsArgs = {
- filter?: Maybe;
- limit?: Maybe;
- offset?: Maybe;
- sort?: Maybe>;
+export type QueryGenerateTestArgs = {
+ limit?: InputMaybe;
+ qualificationIDs: Array;
};
export type QueryProfessionArgs = {
- id?: Maybe;
- slug?: Maybe;
+ id?: InputMaybe;
+ slug?: InputMaybe;
};
-export type QueryQualificationsArgs = {
- filter?: Maybe;
- limit?: Maybe;
- offset?: Maybe;
- sort?: Maybe>;
+export type QueryProfessionsArgs = {
+ filter?: InputMaybe;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ sort?: InputMaybe>;
};
-export type QuerySimilarQualificationsArgs = {
- qualificationID: Scalars['ID'];
- limit?: Maybe;
- offset?: Maybe;
- sort?: Maybe>;
+export type QueryQualificationArgs = {
+ id?: InputMaybe;
+ slug?: InputMaybe;
};
-export type QueryQualificationArgs = {
- id?: Maybe;
- slug?: Maybe;
+export type QueryQualificationsArgs = {
+ filter?: InputMaybe;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ sort?: InputMaybe>;
};
export type QueryQuestionsArgs = {
- filter?: Maybe;
- limit?: Maybe;
- offset?: Maybe;
- sort?: Maybe>;
+ filter?: InputMaybe;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ sort?: InputMaybe>;
};
-export type QueryGenerateTestArgs = {
- qualificationIDs: Array;
- limit?: Maybe;
+export type QuerySimilarQualificationsArgs = {
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ qualificationID: Scalars['ID'];
+ sort?: InputMaybe>;
};
-export type QueryUsersArgs = {
- filter?: Maybe;
- limit?: Maybe;
- offset?: Maybe;
- sort?: Maybe>;
+export type QueryUserArgs = {
+ id: Scalars['ID'];
};
-export type QueryUserArgs = {
- id: Scalars['ID'];
+export type QueryUsersArgs = {
+ filter?: InputMaybe;
+ limit?: InputMaybe;
+ offset?: InputMaybe;
+ sort?: InputMaybe>;
};
export type Question = {
- id: Scalars['ID'];
- from?: Maybe;
- content: Scalars['String'];
- explanation?: Maybe;
- correctAnswer: Answer;
- image?: Maybe;
answerA?: Maybe;
answerAImage?: Maybe;
answerB?: Maybe;
@@ -303,52 +295,58 @@ export type Question = {
answerCImage?: Maybe;
answerD?: Maybe;
answerDImage?: Maybe;
- qualification?: Maybe;
+ content: Scalars['String'];
+ correctAnswer: Answer;
createdAt: Scalars['Time'];
+ explanation?: Maybe;
+ from?: Maybe;
+ id: Scalars['ID'];
+ image?: Maybe;
+ qualification?: Maybe;
updatedAt: Scalars['Time'];
};
export type QuestionFilter = {
- id?: Maybe>;
- idNEQ?: Maybe>;
- from?: Maybe>;
- contentIEQ?: Maybe;
- contentMATCH?: Maybe;
- qualificationID?: Maybe>;
- qualificationIDNEQ?: Maybe>;
- qualificationFilter?: Maybe;
- createdAt?: Maybe;
- createdAtGT?: Maybe;
- createdAtGTE?: Maybe;
- createdAtLT?: Maybe;
- createdAtLTE?: Maybe;
+ contentIEQ?: InputMaybe;
+ contentMATCH?: InputMaybe;
+ createdAt?: InputMaybe;
+ createdAtGT?: InputMaybe;
+ createdAtGTE?: InputMaybe;
+ createdAtLT?: InputMaybe;
+ createdAtLTE?: InputMaybe;
+ from?: InputMaybe>;
+ id?: InputMaybe>;
+ idNEQ?: InputMaybe>;
+ qualificationFilter?: InputMaybe;
+ qualificationID?: InputMaybe>;
+ qualificationIDNEQ?: InputMaybe>;
};
export type QuestionInput = {
- content?: Maybe;
- from?: Maybe;
- explanation?: Maybe;
- correctAnswer?: Maybe;
- qualificationID?: Maybe