fix question query load
This commit is contained in:
4716
app/javascript/__generated__/graphql-schema.json
generated
4716
app/javascript/__generated__/graphql-schema.json
generated
File diff suppressed because it is too large
Load Diff
256
app/javascript/__generated__/graphql-schema.ts
generated
256
app/javascript/__generated__/graphql-schema.ts
generated
@@ -1,4 +1,5 @@
|
||||
export type Maybe<T> = T | null;
|
||||
export type InputMaybe<T> = Maybe<T>;
|
||||
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
|
||||
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
|
||||
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
|
||||
@@ -31,9 +32,9 @@ export type Category = {
|
||||
|
||||
/** Autogenerated input type of CreateQuestion */
|
||||
export type CreateQuestionInput = {
|
||||
question: QuestionCreateInput;
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
question: QuestionCreateInput;
|
||||
};
|
||||
|
||||
/** Autogenerated return type of CreateQuestion */
|
||||
@@ -48,9 +49,9 @@ export type CreateQuestionPayload = {
|
||||
|
||||
/** Autogenerated input type of CreateReviewMessage */
|
||||
export type CreateReviewMessageInput = {
|
||||
message: ReviewMessageInput;
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
message: ReviewMessageInput;
|
||||
};
|
||||
|
||||
/** Autogenerated return type of CreateReviewMessage */
|
||||
@@ -64,15 +65,15 @@ export type CreateReviewMessagePayload = {
|
||||
};
|
||||
|
||||
export type DateRangeInput = {
|
||||
startAt: Scalars['ISO8601Date'];
|
||||
endAt: Scalars['ISO8601Date'];
|
||||
startAt: Scalars['ISO8601Date'];
|
||||
};
|
||||
|
||||
/** Autogenerated input type of DestroyQuestion */
|
||||
export type DestroyQuestionInput = {
|
||||
questionId: Scalars['ID'];
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
questionId: Scalars['ID'];
|
||||
};
|
||||
|
||||
/** Autogenerated return type of DestroyQuestion */
|
||||
@@ -87,9 +88,9 @@ export type DestroyQuestionPayload = {
|
||||
|
||||
/** Autogenerated input type of FinishQuestion */
|
||||
export type FinishQuestionInput = {
|
||||
questionId: Scalars['ID'];
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
questionId: Scalars['ID'];
|
||||
};
|
||||
|
||||
/** Autogenerated return type of FinishQuestion */
|
||||
@@ -102,8 +103,6 @@ export type FinishQuestionPayload = {
|
||||
question?: Maybe<Question>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
export type Mutation = {
|
||||
__typename?: 'Mutation';
|
||||
createQuestion?: Maybe<CreateQuestionPayload>;
|
||||
@@ -181,27 +180,27 @@ export type QueryNodesArgs = {
|
||||
|
||||
|
||||
export type QueryQuestionsArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
where?: Maybe<QuestionWhereInput>;
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
where?: InputMaybe<QuestionWhereInput>;
|
||||
};
|
||||
|
||||
|
||||
export type QueryReviewersArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
|
||||
export type QuerySubjectsArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
export type Question = Node & {
|
||||
@@ -220,9 +219,8 @@ export type Question = Node & {
|
||||
intention?: Maybe<Scalars['String']>;
|
||||
references?: Maybe<Scalars['String']>;
|
||||
reviewMessages: ReviewMessageConnection;
|
||||
reviewRequests: Array<ReviewRequest>;
|
||||
reviewer?: Maybe<User>;
|
||||
status?: Maybe<QuestionStatus>;
|
||||
status: QuestionStatus;
|
||||
subject?: Maybe<Subject>;
|
||||
support?: Maybe<Scalars['String']>;
|
||||
updatedAt: Scalars['ISO8601DateTime'];
|
||||
@@ -231,10 +229,10 @@ export type Question = Node & {
|
||||
|
||||
|
||||
export type QuestionReviewMessagesArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
export type QuestionAlternative = {
|
||||
@@ -244,30 +242,30 @@ export type QuestionAlternative = {
|
||||
};
|
||||
|
||||
export type QuestionAlternativeInput = {
|
||||
correct?: Maybe<Scalars['Boolean']>;
|
||||
text?: Maybe<Scalars['String']>;
|
||||
correct?: InputMaybe<Scalars['Boolean']>;
|
||||
text?: InputMaybe<Scalars['String']>;
|
||||
};
|
||||
|
||||
export enum QuestionBloomTaxonomy {
|
||||
Remember = 'remember',
|
||||
Understand = 'understand',
|
||||
Apply = 'apply',
|
||||
Analyze = 'analyze',
|
||||
Evaluate = 'evaluate',
|
||||
Create = 'create'
|
||||
Analyze = 'ANALYZE',
|
||||
Apply = 'APPLY',
|
||||
Create = 'CREATE',
|
||||
Evaluate = 'EVALUATE',
|
||||
Remember = 'REMEMBER',
|
||||
Understand = 'UNDERSTAND'
|
||||
}
|
||||
|
||||
export enum QuestionCheckType {
|
||||
UniqueAnswer = 'unique_answer',
|
||||
IncompleteAffirmation = 'incomplete_affirmation',
|
||||
MultipleAnswer = 'multiple_answer',
|
||||
NegativeFocus = 'negative_focus',
|
||||
AssertionAndReason = 'assertion_and_reason',
|
||||
Gap = 'gap',
|
||||
Interpretation = 'interpretation',
|
||||
Association = 'association',
|
||||
OrderingOrRanking = 'ordering_or_ranking',
|
||||
ConstantAlternatives = 'constant_alternatives'
|
||||
AssertionAndReason = 'ASSERTION_AND_REASON',
|
||||
Association = 'ASSOCIATION',
|
||||
ConstantAlternatives = 'CONSTANT_ALTERNATIVES',
|
||||
Gap = 'GAP',
|
||||
IncompleteAffirmation = 'INCOMPLETE_AFFIRMATION',
|
||||
Interpretation = 'INTERPRETATION',
|
||||
MultipleAnswer = 'MULTIPLE_ANSWER',
|
||||
NegativeFocus = 'NEGATIVE_FOCUS',
|
||||
OrderingOrRanking = 'ORDERING_OR_RANKING',
|
||||
UniqueAnswer = 'UNIQUE_ANSWER'
|
||||
}
|
||||
|
||||
/** The connection type for Question. */
|
||||
@@ -283,27 +281,27 @@ export type QuestionConnection = {
|
||||
};
|
||||
|
||||
export type QuestionCreateInput = {
|
||||
instruction: Scalars['String'];
|
||||
support: Scalars['String'];
|
||||
body: Scalars['String'];
|
||||
alternatives: Array<QuestionAlternativeInput>;
|
||||
explanation: Scalars['String'];
|
||||
references: Scalars['String'];
|
||||
authorshipYear: Scalars['String'];
|
||||
authorship: Scalars['String'];
|
||||
intention?: Maybe<Scalars['String']>;
|
||||
authorshipYear: Scalars['String'];
|
||||
bloomTaxonomy?: InputMaybe<QuestionBloomTaxonomy>;
|
||||
body: Scalars['String'];
|
||||
checkType?: InputMaybe<QuestionCheckType>;
|
||||
difficulty?: InputMaybe<QuestionDifficulty>;
|
||||
explanation: Scalars['String'];
|
||||
instruction: Scalars['String'];
|
||||
intention?: InputMaybe<Scalars['String']>;
|
||||
references: Scalars['String'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']>;
|
||||
status: QuestionStatus;
|
||||
checkType?: Maybe<QuestionCheckType>;
|
||||
difficulty?: Maybe<QuestionDifficulty>;
|
||||
bloomTaxonomy?: Maybe<QuestionBloomTaxonomy>;
|
||||
subjectId?: Maybe<Scalars['ID']>;
|
||||
reviewerUserId?: Maybe<Scalars['ID']>;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
support: Scalars['String'];
|
||||
};
|
||||
|
||||
export enum QuestionDifficulty {
|
||||
Easy = 'easy',
|
||||
Medium = 'medium',
|
||||
Hard = 'hard'
|
||||
Easy = 'EASY',
|
||||
Hard = 'HARD',
|
||||
Medium = 'MEDIUM'
|
||||
}
|
||||
|
||||
/** An edge in a connection. */
|
||||
@@ -316,42 +314,42 @@ export type QuestionEdge = {
|
||||
};
|
||||
|
||||
export enum QuestionStatus {
|
||||
Draft = 'DRAFT',
|
||||
WaitingReview = 'WAITING_REVIEW',
|
||||
WithRequestedChanges = 'WITH_REQUESTED_CHANGES',
|
||||
Approved = 'APPROVED',
|
||||
Registered = 'REGISTERED'
|
||||
Draft = 'DRAFT',
|
||||
Registered = 'REGISTERED',
|
||||
WaitingReview = 'WAITING_REVIEW',
|
||||
WithRequestedChanges = 'WITH_REQUESTED_CHANGES'
|
||||
}
|
||||
|
||||
export type QuestionUpdateInput = {
|
||||
instruction: Scalars['String'];
|
||||
support: Scalars['String'];
|
||||
body: Scalars['String'];
|
||||
alternatives: Array<QuestionAlternativeInput>;
|
||||
explanation: Scalars['String'];
|
||||
references: Scalars['String'];
|
||||
authorshipYear: Scalars['String'];
|
||||
authorship: Scalars['String'];
|
||||
intention?: Maybe<Scalars['String']>;
|
||||
status: QuestionStatus;
|
||||
checkType?: Maybe<QuestionCheckType>;
|
||||
difficulty?: Maybe<QuestionDifficulty>;
|
||||
bloomTaxonomy?: Maybe<QuestionBloomTaxonomy>;
|
||||
subjectId?: Maybe<Scalars['ID']>;
|
||||
reviewerUserId?: Maybe<Scalars['ID']>;
|
||||
authorshipYear: Scalars['String'];
|
||||
bloomTaxonomy?: InputMaybe<QuestionBloomTaxonomy>;
|
||||
body: Scalars['String'];
|
||||
checkType?: InputMaybe<QuestionCheckType>;
|
||||
difficulty?: InputMaybe<QuestionDifficulty>;
|
||||
explanation: Scalars['String'];
|
||||
id: Scalars['ID'];
|
||||
instruction: Scalars['String'];
|
||||
intention?: InputMaybe<Scalars['String']>;
|
||||
references: Scalars['String'];
|
||||
reviewerUserId?: InputMaybe<Scalars['ID']>;
|
||||
status: QuestionStatus;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
support: Scalars['String'];
|
||||
};
|
||||
|
||||
export type QuestionWhereInput = {
|
||||
checkType?: Maybe<Array<QuestionCheckType>>;
|
||||
status?: Maybe<Array<QuestionStatus>>;
|
||||
difficulty?: Maybe<Array<QuestionDifficulty>>;
|
||||
bloomTaxonomy?: Maybe<Array<QuestionBloomTaxonomy>>;
|
||||
authorshipYear?: Maybe<Array<Scalars['String']>>;
|
||||
subjectId?: Maybe<Scalars['ID']>;
|
||||
userId?: Maybe<Scalars['ID']>;
|
||||
createDate?: Maybe<DateRangeInput>;
|
||||
unifesoAuthorship?: Maybe<Scalars['Boolean']>;
|
||||
authorshipYear?: InputMaybe<Array<Scalars['String']>>;
|
||||
bloomTaxonomy?: InputMaybe<Array<QuestionBloomTaxonomy>>;
|
||||
checkType?: InputMaybe<Array<QuestionCheckType>>;
|
||||
createDate?: InputMaybe<DateRangeInput>;
|
||||
difficulty?: InputMaybe<Array<QuestionDifficulty>>;
|
||||
status?: InputMaybe<Array<QuestionStatus>>;
|
||||
subjectId?: InputMaybe<Scalars['ID']>;
|
||||
unifesoAuthorship?: InputMaybe<Scalars['Boolean']>;
|
||||
userId?: InputMaybe<Scalars['ID']>;
|
||||
};
|
||||
|
||||
export type ReviewMessage = {
|
||||
@@ -387,44 +385,15 @@ export type ReviewMessageEdge = {
|
||||
};
|
||||
|
||||
export enum ReviewMessageFeedbackType {
|
||||
RequestChanges = 'REQUEST_CHANGES',
|
||||
Answer = 'ANSWER',
|
||||
Approve = 'APPROVE',
|
||||
Answer = 'ANSWER'
|
||||
RequestChanges = 'REQUEST_CHANGES'
|
||||
}
|
||||
|
||||
export type ReviewMessageInput = {
|
||||
feedbackType: ReviewMessageFeedbackType;
|
||||
text: Scalars['String'];
|
||||
questionId: Scalars['ID'];
|
||||
};
|
||||
|
||||
export type ReviewRequest = {
|
||||
__typename?: 'ReviewRequest';
|
||||
answered: Scalars['Boolean'];
|
||||
id: Scalars['ID'];
|
||||
question: Question;
|
||||
user: User;
|
||||
};
|
||||
|
||||
/** The connection type for ReviewRequest. */
|
||||
export type ReviewRequestConnection = {
|
||||
__typename?: 'ReviewRequestConnection';
|
||||
/** A list of edges. */
|
||||
edges: Array<ReviewRequestEdge>;
|
||||
/** A list of nodes. */
|
||||
nodes: Array<ReviewRequest>;
|
||||
/** Information to aid in pagination. */
|
||||
pageInfo: PageInfo;
|
||||
totalCount: Scalars['Int'];
|
||||
};
|
||||
|
||||
/** An edge in a connection. */
|
||||
export type ReviewRequestEdge = {
|
||||
__typename?: 'ReviewRequestEdge';
|
||||
/** A cursor for use in pagination. */
|
||||
cursor: Scalars['String'];
|
||||
/** The item at the end of the edge. */
|
||||
node?: Maybe<ReviewRequest>;
|
||||
text: Scalars['String'];
|
||||
};
|
||||
|
||||
export type Subject = {
|
||||
@@ -438,11 +407,11 @@ export type Subject = {
|
||||
|
||||
|
||||
export type SubjectQuestionsArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
where?: Maybe<QuestionWhereInput>;
|
||||
after?: InputMaybe<Scalars['String']>;
|
||||
before?: InputMaybe<Scalars['String']>;
|
||||
first?: InputMaybe<Scalars['Int']>;
|
||||
last?: InputMaybe<Scalars['Int']>;
|
||||
where?: InputMaybe<QuestionWhereInput>;
|
||||
};
|
||||
|
||||
/** The connection type for Subject. */
|
||||
@@ -468,9 +437,9 @@ export type SubjectEdge = {
|
||||
|
||||
/** Autogenerated input type of UpdateQuestion */
|
||||
export type UpdateQuestionInput = {
|
||||
question: QuestionUpdateInput;
|
||||
/** A unique identifier for the client performing the mutation. */
|
||||
clientMutationId?: Maybe<Scalars['String']>;
|
||||
clientMutationId?: InputMaybe<Scalars['String']>;
|
||||
question: QuestionUpdateInput;
|
||||
};
|
||||
|
||||
/** Autogenerated return type of UpdateQuestion */
|
||||
@@ -485,31 +454,12 @@ export type UpdateQuestionPayload = {
|
||||
|
||||
export type User = {
|
||||
__typename?: 'User';
|
||||
activeReviewRequests: ReviewRequestConnection;
|
||||
avatarUrl?: Maybe<Scalars['String']>;
|
||||
email: Scalars['String'];
|
||||
id: Scalars['ID'];
|
||||
inactiveReviewRequests: ReviewRequestConnection;
|
||||
name: Scalars['String'];
|
||||
roles: Array<UserRole>;
|
||||
};
|
||||
|
||||
|
||||
export type UserActiveReviewRequestsArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
|
||||
export type UserInactiveReviewRequestsArgs = {
|
||||
after?: Maybe<Scalars['String']>;
|
||||
before?: Maybe<Scalars['String']>;
|
||||
first?: Maybe<Scalars['Int']>;
|
||||
last?: Maybe<Scalars['Int']>;
|
||||
};
|
||||
|
||||
/** The connection type for User. */
|
||||
export type UserConnection = {
|
||||
__typename?: 'UserConnection';
|
||||
@@ -532,10 +482,10 @@ export type UserEdge = {
|
||||
};
|
||||
|
||||
export enum UserRole {
|
||||
Admin = 'admin',
|
||||
Teacher = 'teacher',
|
||||
Nde = 'nde',
|
||||
Coordinator = 'coordinator',
|
||||
CenterDirector = 'center_director',
|
||||
ProRector = 'pro_rector'
|
||||
Admin = 'ADMIN',
|
||||
CenterDirector = 'CENTER_DIRECTOR',
|
||||
Coordinator = 'COORDINATOR',
|
||||
Nde = 'NDE',
|
||||
ProRector = 'PRO_RECTOR',
|
||||
Teacher = 'TEACHER'
|
||||
}
|
||||
|
||||
666
app/javascript/__generated__/schema.graphql
generated
Normal file
666
app/javascript/__generated__/schema.graphql
generated
Normal file
@@ -0,0 +1,666 @@
|
||||
type Axis {
|
||||
id: ID!
|
||||
name: String!
|
||||
subjects: [Subject!]!
|
||||
}
|
||||
|
||||
type Category {
|
||||
id: ID!
|
||||
name: String!
|
||||
subjects: [Subject!]!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of CreateQuestion
|
||||
"""
|
||||
input CreateQuestionInput {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
question: QuestionCreateInput!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated return type of CreateQuestion
|
||||
"""
|
||||
type CreateQuestionPayload {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
|
||||
"""
|
||||
Errors encountered during execution of the mutation.
|
||||
"""
|
||||
errors: [String!]!
|
||||
question: Question
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of CreateReviewMessage
|
||||
"""
|
||||
input CreateReviewMessageInput {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
message: ReviewMessageInput!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated return type of CreateReviewMessage
|
||||
"""
|
||||
type CreateReviewMessagePayload {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
|
||||
"""
|
||||
Errors encountered during execution of the mutation.
|
||||
"""
|
||||
errors: [String!]!
|
||||
reviewMessage: ReviewMessage
|
||||
}
|
||||
|
||||
input DateRangeInput {
|
||||
endAt: ISO8601Date!
|
||||
startAt: ISO8601Date!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of DestroyQuestion
|
||||
"""
|
||||
input DestroyQuestionInput {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
questionId: ID!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated return type of DestroyQuestion
|
||||
"""
|
||||
type DestroyQuestionPayload {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
deletedQuestionId: ID
|
||||
|
||||
"""
|
||||
Errors encountered during execution of the mutation.
|
||||
"""
|
||||
errors: [String!]!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of FinishQuestion
|
||||
"""
|
||||
input FinishQuestionInput {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
questionId: ID!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated return type of FinishQuestion
|
||||
"""
|
||||
type FinishQuestionPayload {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
|
||||
"""
|
||||
Errors encountered during execution of the mutation.
|
||||
"""
|
||||
errors: [String!]!
|
||||
question: Question
|
||||
}
|
||||
|
||||
"""
|
||||
An ISO 8601-encoded date
|
||||
"""
|
||||
scalar ISO8601Date
|
||||
|
||||
"""
|
||||
An ISO 8601-encoded datetime
|
||||
"""
|
||||
scalar ISO8601DateTime
|
||||
|
||||
type Mutation {
|
||||
createQuestion(
|
||||
"""
|
||||
Parameters for CreateQuestion
|
||||
"""
|
||||
input: CreateQuestionInput!
|
||||
): CreateQuestionPayload
|
||||
createReviewMessage(
|
||||
"""
|
||||
Parameters for CreateReviewMessage
|
||||
"""
|
||||
input: CreateReviewMessageInput!
|
||||
): CreateReviewMessagePayload
|
||||
destroyQuestion(
|
||||
"""
|
||||
Parameters for DestroyQuestion
|
||||
"""
|
||||
input: DestroyQuestionInput!
|
||||
): DestroyQuestionPayload
|
||||
finishQuestion(
|
||||
"""
|
||||
Parameters for FinishQuestion
|
||||
"""
|
||||
input: FinishQuestionInput!
|
||||
): FinishQuestionPayload
|
||||
updateQuestion(
|
||||
"""
|
||||
Parameters for UpdateQuestion
|
||||
"""
|
||||
input: UpdateQuestionInput!
|
||||
): UpdateQuestionPayload
|
||||
}
|
||||
|
||||
"""
|
||||
An object with an ID.
|
||||
"""
|
||||
interface Node {
|
||||
"""
|
||||
ID of the object.
|
||||
"""
|
||||
id: ID!
|
||||
}
|
||||
|
||||
"""
|
||||
Information about pagination in a connection.
|
||||
"""
|
||||
type PageInfo {
|
||||
"""
|
||||
When paginating forwards, the cursor to continue.
|
||||
"""
|
||||
endCursor: String
|
||||
|
||||
"""
|
||||
When paginating forwards, are there more items?
|
||||
"""
|
||||
hasNextPage: Boolean!
|
||||
|
||||
"""
|
||||
When paginating backwards, are there more items?
|
||||
"""
|
||||
hasPreviousPage: Boolean!
|
||||
|
||||
"""
|
||||
When paginating backwards, the cursor to continue.
|
||||
"""
|
||||
startCursor: String
|
||||
}
|
||||
|
||||
type Query {
|
||||
currentUser: User
|
||||
|
||||
"""
|
||||
Fetches an object given its ID.
|
||||
"""
|
||||
node(
|
||||
"""
|
||||
ID of the object.
|
||||
"""
|
||||
id: ID!
|
||||
): Node
|
||||
|
||||
"""
|
||||
Fetches a list of objects given a list of IDs.
|
||||
"""
|
||||
nodes(
|
||||
"""
|
||||
IDs of the objects.
|
||||
"""
|
||||
ids: [ID!]!
|
||||
): [Node]!
|
||||
questions(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
where: QuestionWhereInput
|
||||
): QuestionConnection!
|
||||
reviewers(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
): UserConnection!
|
||||
subjects(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
): SubjectConnection!
|
||||
}
|
||||
|
||||
type Question implements Node {
|
||||
alternatives: [QuestionAlternative!]!
|
||||
authorship: String
|
||||
authorshipYear: String
|
||||
bloomTaxonomy: QuestionBloomTaxonomy
|
||||
body: String
|
||||
checkType: QuestionCheckType
|
||||
createdAt: ISO8601DateTime!
|
||||
difficulty: QuestionDifficulty
|
||||
explanation: String
|
||||
id: ID!
|
||||
instruction: String
|
||||
intention: String
|
||||
references: String
|
||||
reviewMessages(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
): ReviewMessageConnection!
|
||||
reviewer: User
|
||||
status: QuestionStatus!
|
||||
subject: Subject
|
||||
support: String
|
||||
updatedAt: ISO8601DateTime!
|
||||
user: User!
|
||||
}
|
||||
|
||||
type QuestionAlternative {
|
||||
correct: Boolean!
|
||||
text: String
|
||||
}
|
||||
|
||||
input QuestionAlternativeInput {
|
||||
correct: Boolean
|
||||
text: String
|
||||
}
|
||||
|
||||
enum QuestionBloomTaxonomy {
|
||||
ANALYZE
|
||||
APPLY
|
||||
CREATE
|
||||
EVALUATE
|
||||
REMEMBER
|
||||
UNDERSTAND
|
||||
}
|
||||
|
||||
enum QuestionCheckType {
|
||||
ASSERTION_AND_REASON
|
||||
ASSOCIATION
|
||||
CONSTANT_ALTERNATIVES
|
||||
GAP
|
||||
INCOMPLETE_AFFIRMATION
|
||||
INTERPRETATION
|
||||
MULTIPLE_ANSWER
|
||||
NEGATIVE_FOCUS
|
||||
ORDERING_OR_RANKING
|
||||
UNIQUE_ANSWER
|
||||
}
|
||||
|
||||
"""
|
||||
The connection type for Question.
|
||||
"""
|
||||
type QuestionConnection {
|
||||
"""
|
||||
A list of edges.
|
||||
"""
|
||||
edges: [QuestionEdge!]!
|
||||
|
||||
"""
|
||||
A list of nodes.
|
||||
"""
|
||||
nodes: [Question!]!
|
||||
|
||||
"""
|
||||
Information to aid in pagination.
|
||||
"""
|
||||
pageInfo: PageInfo!
|
||||
totalCount: Int!
|
||||
}
|
||||
|
||||
input QuestionCreateInput {
|
||||
alternatives: [QuestionAlternativeInput!]!
|
||||
authorship: String!
|
||||
authorshipYear: String!
|
||||
bloomTaxonomy: QuestionBloomTaxonomy
|
||||
body: String!
|
||||
checkType: QuestionCheckType
|
||||
difficulty: QuestionDifficulty
|
||||
explanation: String!
|
||||
instruction: String!
|
||||
intention: String
|
||||
references: String!
|
||||
reviewerUserId: ID
|
||||
status: QuestionStatus!
|
||||
subjectId: ID
|
||||
support: String!
|
||||
}
|
||||
|
||||
enum QuestionDifficulty {
|
||||
EASY
|
||||
HARD
|
||||
MEDIUM
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection.
|
||||
"""
|
||||
type QuestionEdge {
|
||||
"""
|
||||
A cursor for use in pagination.
|
||||
"""
|
||||
cursor: String!
|
||||
|
||||
"""
|
||||
The item at the end of the edge.
|
||||
"""
|
||||
node: Question
|
||||
}
|
||||
|
||||
enum QuestionStatus {
|
||||
APPROVED
|
||||
DRAFT
|
||||
REGISTERED
|
||||
WAITING_REVIEW
|
||||
WITH_REQUESTED_CHANGES
|
||||
}
|
||||
|
||||
input QuestionUpdateInput {
|
||||
alternatives: [QuestionAlternativeInput!]!
|
||||
authorship: String!
|
||||
authorshipYear: String!
|
||||
bloomTaxonomy: QuestionBloomTaxonomy
|
||||
body: String!
|
||||
checkType: QuestionCheckType
|
||||
difficulty: QuestionDifficulty
|
||||
explanation: String!
|
||||
id: ID!
|
||||
instruction: String!
|
||||
intention: String
|
||||
references: String!
|
||||
reviewerUserId: ID
|
||||
status: QuestionStatus!
|
||||
subjectId: ID
|
||||
support: String!
|
||||
}
|
||||
|
||||
input QuestionWhereInput {
|
||||
authorshipYear: [String!]
|
||||
bloomTaxonomy: [QuestionBloomTaxonomy!]
|
||||
checkType: [QuestionCheckType!]
|
||||
createDate: DateRangeInput
|
||||
difficulty: [QuestionDifficulty!]
|
||||
status: [QuestionStatus!]
|
||||
subjectId: ID
|
||||
unifesoAuthorship: Boolean
|
||||
userId: ID
|
||||
}
|
||||
|
||||
type ReviewMessage {
|
||||
createdAt: ISO8601DateTime!
|
||||
feedbackType: ReviewMessageFeedbackType!
|
||||
id: ID!
|
||||
question: Question!
|
||||
text: String!
|
||||
updatedAt: ISO8601DateTime!
|
||||
user: User!
|
||||
}
|
||||
|
||||
"""
|
||||
The connection type for ReviewMessage.
|
||||
"""
|
||||
type ReviewMessageConnection {
|
||||
"""
|
||||
A list of edges.
|
||||
"""
|
||||
edges: [ReviewMessageEdge!]!
|
||||
|
||||
"""
|
||||
A list of nodes.
|
||||
"""
|
||||
nodes: [ReviewMessage!]!
|
||||
|
||||
"""
|
||||
Information to aid in pagination.
|
||||
"""
|
||||
pageInfo: PageInfo!
|
||||
totalCount: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection.
|
||||
"""
|
||||
type ReviewMessageEdge {
|
||||
"""
|
||||
A cursor for use in pagination.
|
||||
"""
|
||||
cursor: String!
|
||||
|
||||
"""
|
||||
The item at the end of the edge.
|
||||
"""
|
||||
node: ReviewMessage
|
||||
}
|
||||
|
||||
enum ReviewMessageFeedbackType {
|
||||
ANSWER
|
||||
APPROVE
|
||||
REQUEST_CHANGES
|
||||
}
|
||||
|
||||
input ReviewMessageInput {
|
||||
feedbackType: ReviewMessageFeedbackType!
|
||||
questionId: ID!
|
||||
text: String!
|
||||
}
|
||||
|
||||
type Subject {
|
||||
axis: Axis!
|
||||
category: Category!
|
||||
id: ID!
|
||||
name: String!
|
||||
questions(
|
||||
"""
|
||||
Returns the elements in the list that come after the specified cursor.
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Returns the elements in the list that come before the specified cursor.
|
||||
"""
|
||||
before: String
|
||||
|
||||
"""
|
||||
Returns the first _n_ elements from the list.
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
Returns the last _n_ elements from the list.
|
||||
"""
|
||||
last: Int
|
||||
where: QuestionWhereInput
|
||||
): QuestionConnection!
|
||||
}
|
||||
|
||||
"""
|
||||
The connection type for Subject.
|
||||
"""
|
||||
type SubjectConnection {
|
||||
"""
|
||||
A list of edges.
|
||||
"""
|
||||
edges: [SubjectEdge!]!
|
||||
|
||||
"""
|
||||
A list of nodes.
|
||||
"""
|
||||
nodes: [Subject!]!
|
||||
|
||||
"""
|
||||
Information to aid in pagination.
|
||||
"""
|
||||
pageInfo: PageInfo!
|
||||
totalCount: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection.
|
||||
"""
|
||||
type SubjectEdge {
|
||||
"""
|
||||
A cursor for use in pagination.
|
||||
"""
|
||||
cursor: String!
|
||||
|
||||
"""
|
||||
The item at the end of the edge.
|
||||
"""
|
||||
node: Subject
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated input type of UpdateQuestion
|
||||
"""
|
||||
input UpdateQuestionInput {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
question: QuestionUpdateInput!
|
||||
}
|
||||
|
||||
"""
|
||||
Autogenerated return type of UpdateQuestion
|
||||
"""
|
||||
type UpdateQuestionPayload {
|
||||
"""
|
||||
A unique identifier for the client performing the mutation.
|
||||
"""
|
||||
clientMutationId: String
|
||||
|
||||
"""
|
||||
Errors encountered during execution of the mutation.
|
||||
"""
|
||||
errors: [String!]!
|
||||
question: Question
|
||||
}
|
||||
|
||||
type User {
|
||||
email: String!
|
||||
id: ID!
|
||||
name: String!
|
||||
roles: [UserRole!]!
|
||||
}
|
||||
|
||||
"""
|
||||
The connection type for User.
|
||||
"""
|
||||
type UserConnection {
|
||||
"""
|
||||
A list of edges.
|
||||
"""
|
||||
edges: [UserEdge!]!
|
||||
|
||||
"""
|
||||
A list of nodes.
|
||||
"""
|
||||
nodes: [User!]!
|
||||
|
||||
"""
|
||||
Information to aid in pagination.
|
||||
"""
|
||||
pageInfo: PageInfo!
|
||||
totalCount: Int!
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection.
|
||||
"""
|
||||
type UserEdge {
|
||||
"""
|
||||
A cursor for use in pagination.
|
||||
"""
|
||||
cursor: String!
|
||||
|
||||
"""
|
||||
The item at the end of the edge.
|
||||
"""
|
||||
node: User
|
||||
}
|
||||
|
||||
enum UserRole {
|
||||
ADMIN
|
||||
CENTER_DIRECTOR
|
||||
COORDINATOR
|
||||
NDE
|
||||
PRO_RECTOR
|
||||
TEACHER
|
||||
}
|
||||
@@ -10,18 +10,12 @@ type Props = {
|
||||
export const UserAvatar: FC<Props> = ({user, className}) => {
|
||||
return (
|
||||
<div className={`rounded-full border-2 border-primary-light shadow ${className || ''}`}>
|
||||
{user.avatarUrl ?
|
||||
<img
|
||||
src={`${process.env.REACT_APP_BACKEND_URL}/${user.avatarUrl}`}
|
||||
alt={`Avatar do usuário ${user.name}`}
|
||||
/>
|
||||
: <BoringAvatar
|
||||
size={"100%"}
|
||||
name={user.name}
|
||||
variant="pixel"
|
||||
colors={["#595F72", "#575D90", "#84A07C", "#C3D350", "#E6F14A"]}
|
||||
/>
|
||||
}
|
||||
<BoringAvatar
|
||||
size={"100%"}
|
||||
name={user.name}
|
||||
variant="pixel"
|
||||
colors={["#595F72", "#575D90", "#84A07C", "#C3D350", "#E6F14A"]}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
};
|
||||
|
||||
@@ -37,7 +37,6 @@ const CurrentUserQuery = gql`
|
||||
id
|
||||
name
|
||||
email
|
||||
avatarUrl
|
||||
roles
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,12 +55,12 @@ export const QuestionByBloomTaxonomy: FC = () => {
|
||||
const {loading, data} = useQuery<QuestionsByBloomTaxonomyCountQuery>(
|
||||
QuestionsByBloomTaxonomyCount, {
|
||||
variables: {
|
||||
rememberWhere: {bloomTaxonomy: ['remember'], ...where},
|
||||
understandWhere: {bloomTaxonomy: ['understand'], ...where},
|
||||
applyWhere: {bloomTaxonomy: ['apply'], ...where},
|
||||
analyzeWhere: {bloomTaxonomy: ['analyze'], ...where},
|
||||
evaluateWhere: {bloomTaxonomy: ['evaluate'], ...where},
|
||||
createWhere: {bloomTaxonomy: ['create'], ...where},
|
||||
rememberWhere: {bloomTaxonomy: ['REMEMBER'], ...where},
|
||||
understandWhere: {bloomTaxonomy: ['UNDERSTAND'], ...where},
|
||||
applyWhere: {bloomTaxonomy: ['APPLY'], ...where},
|
||||
analyzeWhere: {bloomTaxonomy: ['ANALYZE'], ...where},
|
||||
evaluateWhere: {bloomTaxonomy: ['EVALUATE'], ...where},
|
||||
createWhere: {bloomTaxonomy: ['CREATE'], ...where},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export const TextEditor: FC<Props> = ({ name, defaultValue }) => {
|
||||
config={{
|
||||
toolbar: toolbarOptions,
|
||||
ckfinder: {
|
||||
uploadUrl: `${process.env.REACT_APP_BACKEND_URL}/uploads`,
|
||||
uploadUrl: `/uploads`,
|
||||
},
|
||||
}}
|
||||
onChange={(_: any, editor: any) => onChange(editor.getData())}
|
||||
|
||||
@@ -42,7 +42,6 @@ export const ReviewMessagesFragments = gql`
|
||||
text
|
||||
user {
|
||||
name
|
||||
avatarUrl
|
||||
}
|
||||
createdAt
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { gql } from "@apollo/client";
|
||||
|
||||
import { Card } from "../../../components";
|
||||
import { Question } from "../../../__generated__/graphql-schema";
|
||||
import { loadWIRISplugin } from "../../../utils/plugins";
|
||||
import { BLOOM_TAXONOMY, DIFFICULTY } from "../../../utils/types";
|
||||
|
||||
export const ViewModeFragments = gql`
|
||||
@@ -67,8 +66,6 @@ export const ViewMode: FC<Props> = ({ questionData: question }) => {
|
||||
const difficulty = DIFFICULTY.find((item) => question.difficulty === item.value)?.label
|
||||
const bloomTaxonomy = BLOOM_TAXONOMY.find((item) => question.bloomTaxonomy === item.value)?.label
|
||||
|
||||
loadWIRISplugin()
|
||||
|
||||
return (
|
||||
<div className="max-w-screen-lg">
|
||||
<Card className="mb-3" title="Características">
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
const host = process.env.REACT_APP_BACKEND_URL || "http://localhost:3000";
|
||||
|
||||
export type LoginCredentails = {
|
||||
email: string;
|
||||
password: string;
|
||||
@@ -11,7 +9,7 @@ export const authentication = {
|
||||
user: credentails,
|
||||
};
|
||||
|
||||
const response = await fetch(`${host}/login`, {
|
||||
const response = await fetch(`/login`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
@@ -29,7 +27,7 @@ export const authentication = {
|
||||
resetPasswordEmail: async (email: string) => {
|
||||
const payload = { user: { email } };
|
||||
|
||||
const response = await fetch(`${host}/password`, {
|
||||
const response = await fetch(`/password`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
@@ -59,7 +57,7 @@ export const authentication = {
|
||||
},
|
||||
};
|
||||
|
||||
const response = await fetch(`${host}/password`, {
|
||||
const response = await fetch(`/password`, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
Accept: "application/json",
|
||||
|
||||
@@ -5,9 +5,7 @@ const SEPARATOR_TOKEN = "-";
|
||||
type Decoded = { typeName: string; id: string };
|
||||
|
||||
const decode = (id: Node["id"]): Decoded => {
|
||||
const raw = Buffer.from(id, "base64").toString("ascii");
|
||||
|
||||
const [nodeTypeName, nodeId] = raw.split(SEPARATOR_TOKEN);
|
||||
const [nodeTypeName, nodeId] = atob(id).split(SEPARATOR_TOKEN);
|
||||
|
||||
return {
|
||||
id: nodeId,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
export * from "./wiris";
|
||||
@@ -1,7 +0,0 @@
|
||||
export const loadWIRISplugin = () => {
|
||||
const script = document.createElement("script");
|
||||
script.src = process.env.REACT_APP_WIRIS_PLUGIN_URL ?? "";
|
||||
script.async = true;
|
||||
|
||||
document.body.appendChild(script);
|
||||
};
|
||||
Reference in New Issue
Block a user