From a2a3b3219c9cb128d3421691147d8862afdf57af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Geonizeli?= Date: Thu, 21 Jul 2022 21:51:41 -0300 Subject: [PATCH] fix question query load --- .env.example | 4 +- app/graphql/progress_test_schema.rb | 9 +- app/graphql/types/base_connection.rb | 11 +- app/graphql/types/question_type.rb | 10 +- .../__generated__/graphql-schema.json | 4716 ----------------- .../__generated__/graphql-schema.ts | 256 +- .../__generated__/schema.graphql | 89 +- .../components/UserAvatar/UserAvatar.tsx | 18 +- app/javascript/contexts/UserContext.tsx | 1 - .../charts/QuestionsByBloomTaxonomy.tsx | 12 +- .../question/Form/components/TextEditor.tsx | 2 +- .../shared/ReviewMessages/ReviewMessages.tsx | 1 - .../pages/question/shared/ViewMode.tsx | 3 - app/javascript/services/api.ts | 8 +- app/javascript/utils/graphql/NodeId.ts | 4 +- app/javascript/utils/plugins/index.ts | 1 - app/javascript/utils/plugins/wiris.ts | 7 - app/models/question.rb | 6 + app/views/layouts/application.html.erb | 1 + 19 files changed, 229 insertions(+), 4930 deletions(-) delete mode 100644 app/javascript/__generated__/graphql-schema.json rename app/{graphql => javascript}/__generated__/schema.graphql (88%) delete mode 100644 app/javascript/utils/plugins/index.ts delete mode 100644 app/javascript/utils/plugins/wiris.ts diff --git a/.env.example b/.env.example index 90ff8d2..7794844 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,4 @@ GOOGLE_OAUTH_CLIENT_ID= -GOOGLE_OAUTH_CLIENT_SECRET= \ No newline at end of file +GOOGLE_OAUTH_CLIENT_SECRET= + +WIRIS_PLUGIN_SRC=https://www.wiris.net/demo/plugins/app/WIRISplugins.js?viewer=image \ No newline at end of file diff --git a/app/graphql/progress_test_schema.rb b/app/graphql/progress_test_schema.rb index dc77946..bac9f51 100644 --- a/app/graphql/progress_test_schema.rb +++ b/app/graphql/progress_test_schema.rb @@ -1,5 +1,5 @@ class ProgressTestSchema < GraphQL::Schema - DEFINITION_DUMP_PATH = "app/graphql/__generated__/schema.graphql" + DEFINITION_DUMP_PATH = "app/javascript/__generated__/schema.graphql" mutation(Types::MutationType) query(Types::QueryType) @@ -30,11 +30,14 @@ class ProgressTestSchema < GraphQL::Schema # Return a string UUID for `object` def self.id_from_object(object, type_definition, query_ctx) - object.to_gid_param + # object.to_gid_param + GraphQL::Schema::UniqueWithinType.encode(type_definition.name, object.id) end # Given a string UUID, find the object def self.object_from_id(global_id, query_ctx) - GlobalID.find(global_id) + # GlobalID.find(global_id) + type_name, item_id = GraphQL::Schema::UniqueWithinType.decode(global_id) + type_name.constantize.model.find(item_id) end end diff --git a/app/graphql/types/base_connection.rb b/app/graphql/types/base_connection.rb index df16c17..63ddbaa 100644 --- a/app/graphql/types/base_connection.rb +++ b/app/graphql/types/base_connection.rb @@ -1,6 +1,15 @@ module Types class BaseConnection < Types::BaseObject - # add `nodes` and `pageInfo` fields, as well as `edge_type(...)` and `node_nullable(...)` overrides include GraphQL::Types::Relay::ConnectionBehaviors + + edges_nullable(false) + edge_nullable(false) + node_nullable(false) + + field :total_count, Integer, null: false + + def total_count + object.items.count + end end end diff --git a/app/graphql/types/question_type.rb b/app/graphql/types/question_type.rb index cde3573..ea2e44b 100644 --- a/app/graphql/types/question_type.rb +++ b/app/graphql/types/question_type.rb @@ -7,8 +7,6 @@ module Types graphql_name 'Question' global_id_field :id - field :user_id, Integer, null: false - field :subject_id, Integer field :authorship, String field :authorship_year, String field :body, String @@ -17,6 +15,10 @@ module Types field :intention, String field :references, String field :support, String + field :user, Types::UserType, null: false + field :subject, Types::SubjectType + field :reviewer, Types::UserType + field :review_messages, Types::ReviewMessageType.connection_type, null: false field :alternatives, [Types::QuestionAlternativeType], null: false field :bloom_taxonomy, Enums::QuestionBloomTaxonomyEnum field :check_type, Enums::QuestionCheckTypeEnum @@ -24,5 +26,9 @@ module Types field :status, Enums::QuestionStatusEnum, null: false field :created_at, GraphQL::Types::ISO8601DateTime, null: false field :updated_at, GraphQL::Types::ISO8601DateTime, null: false + + def self.model + Question + end end end diff --git a/app/javascript/__generated__/graphql-schema.json b/app/javascript/__generated__/graphql-schema.json deleted file mode 100644 index 9062dfe..0000000 --- a/app/javascript/__generated__/graphql-schema.json +++ /dev/null @@ -1,4716 +0,0 @@ -{ - "data": { - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": { - "name": "Mutation" - }, - "subscriptionType": null, - "types": [ - { - "kind": "OBJECT", - "name": "Axis", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "subjects", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "Boolean", - "description": "Represents `true` or `false` values.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "Category", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "subjects", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "CreateQuestionInput", - "description": "Autogenerated input type of CreateQuestion", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "question", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "QuestionCreateInput", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "CreateQuestionPayload", - "description": "Autogenerated return type of CreateQuestion", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "errors", - "description": "Errors encountered during execution of the mutation.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "question", - "description": null, - "type": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "CreateReviewMessageInput", - "description": "Autogenerated input type of CreateReviewMessage", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "message", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ReviewMessageInput", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "CreateReviewMessagePayload", - "description": "Autogenerated return type of CreateReviewMessage", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "errors", - "description": "Errors encountered during execution of the mutation.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "reviewMessage", - "description": null, - "type": { - "kind": "OBJECT", - "name": "ReviewMessage", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "DateRangeInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "startAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601Date", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "endAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601Date", - "ofType": null - } - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "DestroyQuestionInput", - "description": "Autogenerated input type of DestroyQuestion", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "questionId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "DestroyQuestionPayload", - "description": "Autogenerated return type of DestroyQuestion", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "deletedQuestionId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "errors", - "description": "Errors encountered during execution of the mutation.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "FinishQuestionInput", - "description": "Autogenerated input type of FinishQuestion", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "questionId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "FinishQuestionPayload", - "description": "Autogenerated return type of FinishQuestion", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "errors", - "description": "Errors encountered during execution of the mutation.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "question", - "description": null, - "type": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "ID", - "description": "Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `\"VXNlci0xMA==\"`) or integer (such as `4`) input value will be accepted as an ID.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "ISO8601Date", - "description": "An ISO 8601-encoded date", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "description": "An ISO 8601-encoded datetime", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "Int", - "description": "Represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "Mutation", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "createQuestion", - "description": null, - "type": { - "kind": "OBJECT", - "name": "CreateQuestionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "input", - "description": "Parameters for CreateQuestion", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CreateQuestionInput", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "createReviewMessage", - "description": null, - "type": { - "kind": "OBJECT", - "name": "CreateReviewMessagePayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "input", - "description": "Parameters for CreateReviewMessage", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CreateReviewMessageInput", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "destroyQuestion", - "description": null, - "type": { - "kind": "OBJECT", - "name": "DestroyQuestionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "input", - "description": "Parameters for DestroyQuestion", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DestroyQuestionInput", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "finishQuestion", - "description": null, - "type": { - "kind": "OBJECT", - "name": "FinishQuestionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "input", - "description": "Parameters for FinishQuestion", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FinishQuestionInput", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "updateQuestion", - "description": null, - "type": { - "kind": "OBJECT", - "name": "UpdateQuestionPayload", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "input", - "description": "Parameters for UpdateQuestion", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateQuestionInput", - "ofType": null - } - }, - "defaultValue": null - } - ] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INTERFACE", - "name": "Node", - "description": "An object with an ID.", - "interfaces": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Question", - "ofType": null - } - ], - "fields": [ - { - "name": "id", - "description": "ID of the object.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "PageInfo", - "description": "Information about pagination in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "endCursor", - "description": "When paginating forwards, the cursor to continue.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "hasNextPage", - "description": "When paginating forwards, are there more items?", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "hasPreviousPage", - "description": "When paginating backwards, are there more items?", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "startCursor", - "description": "When paginating backwards, the cursor to continue.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "Query", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "currentUser", - "description": null, - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "Fetches an object given its ID.", - "type": { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "id", - "description": "ID of the object.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "nodes", - "description": "Fetches a list of objects given a list of IDs.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "ids", - "description": "IDs of the objects.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - } - } - }, - "defaultValue": null - } - ] - }, - { - "name": "questions", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "QuestionWhereInput", - "ofType": null - }, - "defaultValue": null - } - ] - }, - { - "name": "reviewers", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - } - ] - }, - { - "name": "subjects", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubjectConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - } - ] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "Question", - "description": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - } - ], - "possibleTypes": null, - "fields": [ - { - "name": "alternatives", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionAlternative", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "authorship", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "authorshipYear", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "bloomTaxonomy", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionBloomTaxonomy", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "body", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "checkType", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionCheckType", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "createdAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "difficulty", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionDifficulty", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "explanation", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "instruction", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "intention", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "references", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "reviewMessages", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewMessageConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - } - ] - }, - { - "name": "reviewRequests", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewRequest", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "reviewer", - "description": null, - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "status", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionStatus", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "subject", - "description": null, - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "support", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "updatedAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "user", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "QuestionAlternative", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "correct", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "text", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "QuestionAlternativeInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "correct", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "text", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "ENUM", - "name": "QuestionBloomTaxonomy", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "remember", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "understand", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "apply", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "analyze", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "evaluate", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "create", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "ENUM", - "name": "QuestionCheckType", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "unique_answer", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "incomplete_affirmation", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "multiple_answer", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "negative_focus", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "assertion_and_reason", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "gap", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "interpretation", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "association", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ordering_or_ranking", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "constant_alternatives", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "OBJECT", - "name": "QuestionConnection", - "description": "The connection type for Question.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "nodes", - "description": "A list of nodes.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "totalCount", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "QuestionCreateInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "instruction", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "support", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "body", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "alternatives", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "QuestionAlternativeInput", - "ofType": null - } - } - } - }, - "defaultValue": null - }, - { - "name": "explanation", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "references", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "authorshipYear", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "authorship", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "intention", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "status", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionStatus", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "checkType", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionCheckType", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "difficulty", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionDifficulty", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "bloomTaxonomy", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionBloomTaxonomy", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "subjectId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "reviewerUserId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "ENUM", - "name": "QuestionDifficulty", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "easy", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "medium", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "hard", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "OBJECT", - "name": "QuestionEdge", - "description": "An edge in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "cursor", - "description": "A cursor for use in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "The item at the end of the edge.", - "type": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "ENUM", - "name": "QuestionStatus", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "DRAFT", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "WAITING_REVIEW", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "WITH_REQUESTED_CHANGES", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "APPROVED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "REGISTERED", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "INPUT_OBJECT", - "name": "QuestionUpdateInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "instruction", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "support", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "body", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "alternatives", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "QuestionAlternativeInput", - "ofType": null - } - } - } - }, - "defaultValue": null - }, - { - "name": "explanation", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "references", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "authorshipYear", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "authorship", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "intention", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "status", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionStatus", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "checkType", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionCheckType", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "difficulty", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionDifficulty", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "bloomTaxonomy", - "description": null, - "type": { - "kind": "ENUM", - "name": "QuestionBloomTaxonomy", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "subjectId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "reviewerUserId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "QuestionWhereInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "checkType", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionCheckType", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "status", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionStatus", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "difficulty", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionDifficulty", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "bloomTaxonomy", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "QuestionBloomTaxonomy", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "authorshipYear", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "subjectId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "userId", - "description": null, - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "createDate", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "DateRangeInput", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "unifesoAuthorship", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewMessage", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "createdAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "feedbackType", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ReviewMessageFeedbackType", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "question", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "text", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "updatedAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ISO8601DateTime", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "user", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewMessageConnection", - "description": "The connection type for ReviewMessage.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewMessageEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "nodes", - "description": "A list of nodes.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewMessage", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "totalCount", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewMessageEdge", - "description": "An edge in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "cursor", - "description": "A cursor for use in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "The item at the end of the edge.", - "type": { - "kind": "OBJECT", - "name": "ReviewMessage", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "ENUM", - "name": "ReviewMessageFeedbackType", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "REQUEST_CHANGES", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "APPROVE", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ANSWER", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "INPUT_OBJECT", - "name": "ReviewMessageInput", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "feedbackType", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "ReviewMessageFeedbackType", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "text", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "questionId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewRequest", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "answered", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "question", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "user", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewRequestConnection", - "description": "The connection type for ReviewRequest.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewRequestEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "nodes", - "description": "A list of nodes.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewRequest", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "totalCount", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "ReviewRequestEdge", - "description": "An edge in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "cursor", - "description": "A cursor for use in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "The item at the end of the edge.", - "type": { - "kind": "OBJECT", - "name": "ReviewRequest", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "SCALAR", - "name": "String", - "description": "Represents textual data as UTF-8 character sequences. This type is most often used by GraphQL to represent free-form human-readable text.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "Subject", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "axis", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Axis", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "category", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Category", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "questions", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "QuestionConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "where", - "description": null, - "type": { - "kind": "INPUT_OBJECT", - "name": "QuestionWhereInput", - "ofType": null - }, - "defaultValue": null - } - ] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "SubjectConnection", - "description": "The connection type for Subject.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "SubjectEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "nodes", - "description": "A list of nodes.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "totalCount", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "SubjectEdge", - "description": "An edge in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "cursor", - "description": "A cursor for use in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "The item at the end of the edge.", - "type": { - "kind": "OBJECT", - "name": "Subject", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateQuestionInput", - "description": "Autogenerated input type of UpdateQuestion", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": [ - { - "name": "question", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "QuestionUpdateInput", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "UpdateQuestionPayload", - "description": "Autogenerated return type of UpdateQuestion", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "errors", - "description": "Errors encountered during execution of the mutation.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "question", - "description": null, - "type": { - "kind": "OBJECT", - "name": "Question", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "User", - "description": null, - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "activeReviewRequests", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewRequestConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - } - ] - }, - { - "name": "avatarUrl", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "email", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "inactiveReviewRequests", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ReviewRequestConnection", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - } - ] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "roles", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "UserRole", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "UserConnection", - "description": "The connection type for User.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "edges", - "description": "A list of edges.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "UserEdge", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "nodes", - "description": "A list of nodes.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "totalCount", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "UserEdge", - "description": "An edge in a connection.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "cursor", - "description": "A cursor for use in pagination.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "node", - "description": "The item at the end of the edge.", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "ENUM", - "name": "UserRole", - "description": null, - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "admin", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "teacher", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nde", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "coordinator", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "center_director", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "pro_rector", - "description": null, - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "OBJECT", - "name": "__Directive", - "description": "A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "args", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ] - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "locations", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__DirectiveLocation", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "onField", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": true, - "deprecationReason": "Use `locations`.", - "args": [] - }, - { - "name": "onFragment", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": true, - "deprecationReason": "Use `locations`.", - "args": [] - }, - { - "name": "onOperation", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": true, - "deprecationReason": "Use `locations`.", - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "ENUM", - "name": "__DirectiveLocation", - "description": "A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "QUERY", - "description": "Location adjacent to a query operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "MUTATION", - "description": "Location adjacent to a mutation operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SUBSCRIPTION", - "description": "Location adjacent to a subscription operation.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD", - "description": "Location adjacent to a field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_DEFINITION", - "description": "Location adjacent to a fragment definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FRAGMENT_SPREAD", - "description": "Location adjacent to a fragment spread.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INLINE_FRAGMENT", - "description": "Location adjacent to an inline fragment.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCHEMA", - "description": "Location adjacent to a schema definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "SCALAR", - "description": "Location adjacent to a scalar definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Location adjacent to an object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "FIELD_DEFINITION", - "description": "Location adjacent to a field definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ARGUMENT_DEFINITION", - "description": "Location adjacent to an argument definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Location adjacent to an interface definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Location adjacent to a union definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Location adjacent to an enum definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM_VALUE", - "description": "Location adjacent to an enum value definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Location adjacent to an input object type definition.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_FIELD_DEFINITION", - "description": "Location adjacent to an input object field definition.", - "isDeprecated": false, - "deprecationReason": null - } - ] - }, - { - "kind": "OBJECT", - "name": "__EnumValue", - "description": "One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "deprecationReason", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "isDeprecated", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "__Field", - "description": "Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "args", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ] - }, - { - "name": "deprecationReason", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "isDeprecated", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "type", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "__InputValue", - "description": "Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "defaultValue", - "description": "A GraphQL-formatted string representing the default value for this input value.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "deprecationReason", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "isDeprecated", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "type", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "__Schema", - "description": "A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "directives", - "description": "A list of all directives supported by this server.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Directive", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "mutationType", - "description": "If this server supports mutation, the type that mutation operations will be rooted at.", - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "queryType", - "description": "The type that query operations will be rooted at.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "subscriptionType", - "description": "If this server support subscription, the type that subscription operations will be rooted at.", - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "types", - "description": "A list of all types supported by this server.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "OBJECT", - "name": "__Type", - "description": "The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name and description, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.", - "interfaces": [], - "possibleTypes": null, - "fields": [ - { - "name": "description", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "enumValues", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__EnumValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ] - }, - { - "name": "fields", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Field", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ] - }, - { - "name": "inputFields", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__InputValue", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [ - { - "name": "includeDeprecated", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": "false" - } - ] - }, - { - "name": "interfaces", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "kind", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "ENUM", - "name": "__TypeKind", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "name", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "ofType", - "description": null, - "type": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - }, - { - "name": "possibleTypes", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "__Type", - "ofType": null - } - } - }, - "isDeprecated": false, - "deprecationReason": null, - "args": [] - } - ], - "inputFields": null, - "enumValues": null - }, - { - "kind": "ENUM", - "name": "__TypeKind", - "description": "An enum describing what kind of type a given `__Type` is.", - "interfaces": null, - "possibleTypes": null, - "fields": null, - "inputFields": null, - "enumValues": [ - { - "name": "SCALAR", - "description": "Indicates this type is a scalar.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "OBJECT", - "description": "Indicates this type is an object. `fields` and `interfaces` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INTERFACE", - "description": "Indicates this type is an interface. `fields` and `possibleTypes` are valid fields.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "UNION", - "description": "Indicates this type is a union. `possibleTypes` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "ENUM", - "description": "Indicates this type is an enum. `enumValues` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "INPUT_OBJECT", - "description": "Indicates this type is an input object. `inputFields` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "LIST", - "description": "Indicates this type is a list. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "NON_NULL", - "description": "Indicates this type is a non-null. `ofType` is a valid field.", - "isDeprecated": false, - "deprecationReason": null - } - ] - } - ], - "directives": [ - { - "name": "include", - "description": "Directs the executor to include this field or fragment only when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Included when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "skip", - "description": "Directs the executor to skip this field or fragment when the `if` argument is true.", - "locations": [ - "FIELD", - "FRAGMENT_SPREAD", - "INLINE_FRAGMENT" - ], - "args": [ - { - "name": "if", - "description": "Skipped when true.", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - } - ] - }, - { - "name": "deprecated", - "description": "Marks an element of a GraphQL schema as no longer supported.", - "locations": [ - "FIELD_DEFINITION", - "ENUM_VALUE", - "ARGUMENT_DEFINITION", - "INPUT_FIELD_DEFINITION" - ], - "args": [ - { - "name": "reason", - "description": "Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted in [Markdown](https://daringfireball.net/projects/markdown/).", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": "\"No longer supported\"" - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/app/javascript/__generated__/graphql-schema.ts b/app/javascript/__generated__/graphql-schema.ts index ec1ae68..05780fb 100644 --- a/app/javascript/__generated__/graphql-schema.ts +++ b/app/javascript/__generated__/graphql-schema.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 }; @@ -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; + clientMutationId?: InputMaybe; + 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; + clientMutationId?: InputMaybe; + 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; + clientMutationId?: InputMaybe; + 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; + clientMutationId?: InputMaybe; + questionId: Scalars['ID']; }; /** Autogenerated return type of FinishQuestion */ @@ -102,8 +103,6 @@ export type FinishQuestionPayload = { question?: Maybe; }; - - export type Mutation = { __typename?: 'Mutation'; createQuestion?: Maybe; @@ -181,27 +180,27 @@ export type QueryNodesArgs = { export type QueryQuestionsArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - where?: Maybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + where?: InputMaybe; }; export type QueryReviewersArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type QuerySubjectsArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type Question = Node & { @@ -220,9 +219,8 @@ export type Question = Node & { intention?: Maybe; references?: Maybe; reviewMessages: ReviewMessageConnection; - reviewRequests: Array; reviewer?: Maybe; - status?: Maybe; + status: QuestionStatus; subject?: Maybe; support?: Maybe; updatedAt: Scalars['ISO8601DateTime']; @@ -231,10 +229,10 @@ export type Question = Node & { export type QuestionReviewMessagesArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type QuestionAlternative = { @@ -244,30 +242,30 @@ export type QuestionAlternative = { }; export type QuestionAlternativeInput = { - correct?: Maybe; - text?: Maybe; + correct?: InputMaybe; + text?: InputMaybe; }; 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; - explanation: Scalars['String']; - references: Scalars['String']; - authorshipYear: Scalars['String']; authorship: Scalars['String']; - intention?: Maybe; + authorshipYear: Scalars['String']; + bloomTaxonomy?: InputMaybe; + body: Scalars['String']; + checkType?: InputMaybe; + difficulty?: InputMaybe; + explanation: Scalars['String']; + instruction: Scalars['String']; + intention?: InputMaybe; + references: Scalars['String']; + reviewerUserId?: InputMaybe; status: QuestionStatus; - checkType?: Maybe; - difficulty?: Maybe; - bloomTaxonomy?: Maybe; - subjectId?: Maybe; - reviewerUserId?: Maybe; + subjectId?: InputMaybe; + 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; - explanation: Scalars['String']; - references: Scalars['String']; - authorshipYear: Scalars['String']; authorship: Scalars['String']; - intention?: Maybe; - status: QuestionStatus; - checkType?: Maybe; - difficulty?: Maybe; - bloomTaxonomy?: Maybe; - subjectId?: Maybe; - reviewerUserId?: Maybe; + authorshipYear: Scalars['String']; + bloomTaxonomy?: InputMaybe; + body: Scalars['String']; + checkType?: InputMaybe; + difficulty?: InputMaybe; + explanation: Scalars['String']; id: Scalars['ID']; + instruction: Scalars['String']; + intention?: InputMaybe; + references: Scalars['String']; + reviewerUserId?: InputMaybe; + status: QuestionStatus; + subjectId?: InputMaybe; + support: Scalars['String']; }; export type QuestionWhereInput = { - checkType?: Maybe>; - status?: Maybe>; - difficulty?: Maybe>; - bloomTaxonomy?: Maybe>; - authorshipYear?: Maybe>; - subjectId?: Maybe; - userId?: Maybe; - createDate?: Maybe; - unifesoAuthorship?: Maybe; + authorshipYear?: InputMaybe>; + bloomTaxonomy?: InputMaybe>; + checkType?: InputMaybe>; + createDate?: InputMaybe; + difficulty?: InputMaybe>; + status?: InputMaybe>; + subjectId?: InputMaybe; + unifesoAuthorship?: InputMaybe; + userId?: InputMaybe; }; 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; - /** A list of nodes. */ - nodes: Array; - /** 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; + text: Scalars['String']; }; export type Subject = { @@ -438,11 +407,11 @@ export type Subject = { export type SubjectQuestionsArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; - where?: Maybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + where?: InputMaybe; }; /** 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; + clientMutationId?: InputMaybe; + question: QuestionUpdateInput; }; /** Autogenerated return type of UpdateQuestion */ @@ -485,31 +454,12 @@ export type UpdateQuestionPayload = { export type User = { __typename?: 'User'; - activeReviewRequests: ReviewRequestConnection; - avatarUrl?: Maybe; email: Scalars['String']; id: Scalars['ID']; - inactiveReviewRequests: ReviewRequestConnection; name: Scalars['String']; roles: Array; }; - -export type UserActiveReviewRequestsArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; -}; - - -export type UserInactiveReviewRequestsArgs = { - after?: Maybe; - before?: Maybe; - first?: Maybe; - last?: Maybe; -}; - /** 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' } diff --git a/app/graphql/__generated__/schema.graphql b/app/javascript/__generated__/schema.graphql similarity index 88% rename from app/graphql/__generated__/schema.graphql rename to app/javascript/__generated__/schema.graphql index 4b83029..f830026 100644 --- a/app/graphql/__generated__/schema.graphql +++ b/app/javascript/__generated__/schema.graphql @@ -133,11 +133,6 @@ An ISO 8601-encoded datetime """ scalar ISO8601DateTime -""" -Represents untyped JSON -""" -scalar JSON - type Mutation { createQuestion( """ @@ -295,7 +290,7 @@ type Query { } type Question implements Node { - alternatives: JSON! + alternatives: [QuestionAlternative!]! authorship: String authorshipYear: String bloomTaxonomy: QuestionBloomTaxonomy @@ -308,11 +303,38 @@ type Question implements Node { 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! - subjectId: Int + subject: Subject support: String updatedAt: ISO8601DateTime! - userId: Int! + user: User! +} + +type QuestionAlternative { + correct: Boolean! + text: String } input QuestionAlternativeInput { @@ -349,17 +371,18 @@ type QuestionConnection { """ A list of edges. """ - edges: [QuestionEdge] + edges: [QuestionEdge!]! """ A list of nodes. """ - nodes: [Question] + nodes: [Question!]! """ Information to aid in pagination. """ pageInfo: PageInfo! + totalCount: Int! } input QuestionCreateInput { @@ -450,6 +473,42 @@ type ReviewMessage { 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 @@ -498,17 +557,18 @@ type SubjectConnection { """ A list of edges. """ - edges: [SubjectEdge] + edges: [SubjectEdge!]! """ A list of nodes. """ - nodes: [Subject] + nodes: [Subject!]! """ Information to aid in pagination. """ pageInfo: PageInfo! + totalCount: Int! } """ @@ -567,17 +627,18 @@ type UserConnection { """ A list of edges. """ - edges: [UserEdge] + edges: [UserEdge!]! """ A list of nodes. """ - nodes: [User] + nodes: [User!]! """ Information to aid in pagination. """ pageInfo: PageInfo! + totalCount: Int! } """ diff --git a/app/javascript/components/UserAvatar/UserAvatar.tsx b/app/javascript/components/UserAvatar/UserAvatar.tsx index 3dfec4a..92f8a6e 100644 --- a/app/javascript/components/UserAvatar/UserAvatar.tsx +++ b/app/javascript/components/UserAvatar/UserAvatar.tsx @@ -10,18 +10,12 @@ type Props = { export const UserAvatar: FC = ({user, className}) => { return (
- {user.avatarUrl ? - {`Avatar - : - } +
) }; diff --git a/app/javascript/contexts/UserContext.tsx b/app/javascript/contexts/UserContext.tsx index 6fd3d59..ed2c11a 100644 --- a/app/javascript/contexts/UserContext.tsx +++ b/app/javascript/contexts/UserContext.tsx @@ -37,7 +37,6 @@ const CurrentUserQuery = gql` id name email - avatarUrl roles } } diff --git a/app/javascript/pages/dashboard/charts/QuestionsByBloomTaxonomy.tsx b/app/javascript/pages/dashboard/charts/QuestionsByBloomTaxonomy.tsx index c02953d..a9f6b43 100644 --- a/app/javascript/pages/dashboard/charts/QuestionsByBloomTaxonomy.tsx +++ b/app/javascript/pages/dashboard/charts/QuestionsByBloomTaxonomy.tsx @@ -55,12 +55,12 @@ export const QuestionByBloomTaxonomy: FC = () => { const {loading, data} = useQuery( 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}, } }) diff --git a/app/javascript/pages/question/Form/components/TextEditor.tsx b/app/javascript/pages/question/Form/components/TextEditor.tsx index fff177b..9acba4f 100644 --- a/app/javascript/pages/question/Form/components/TextEditor.tsx +++ b/app/javascript/pages/question/Form/components/TextEditor.tsx @@ -44,7 +44,7 @@ export const TextEditor: FC = ({ name, defaultValue }) => { config={{ toolbar: toolbarOptions, ckfinder: { - uploadUrl: `${process.env.REACT_APP_BACKEND_URL}/uploads`, + uploadUrl: `/uploads`, }, }} onChange={(_: any, editor: any) => onChange(editor.getData())} diff --git a/app/javascript/pages/question/shared/ReviewMessages/ReviewMessages.tsx b/app/javascript/pages/question/shared/ReviewMessages/ReviewMessages.tsx index 955eadf..ce6588a 100644 --- a/app/javascript/pages/question/shared/ReviewMessages/ReviewMessages.tsx +++ b/app/javascript/pages/question/shared/ReviewMessages/ReviewMessages.tsx @@ -42,7 +42,6 @@ export const ReviewMessagesFragments = gql` text user { name - avatarUrl } createdAt } diff --git a/app/javascript/pages/question/shared/ViewMode.tsx b/app/javascript/pages/question/shared/ViewMode.tsx index 4bfa46c..26776e5 100644 --- a/app/javascript/pages/question/shared/ViewMode.tsx +++ b/app/javascript/pages/question/shared/ViewMode.tsx @@ -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 = ({ 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 (
diff --git a/app/javascript/services/api.ts b/app/javascript/services/api.ts index fd60a59..41aa7d4 100644 --- a/app/javascript/services/api.ts +++ b/app/javascript/services/api.ts @@ -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", diff --git a/app/javascript/utils/graphql/NodeId.ts b/app/javascript/utils/graphql/NodeId.ts index 0cf1ea2..5a6422d 100644 --- a/app/javascript/utils/graphql/NodeId.ts +++ b/app/javascript/utils/graphql/NodeId.ts @@ -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, diff --git a/app/javascript/utils/plugins/index.ts b/app/javascript/utils/plugins/index.ts deleted file mode 100644 index 40e048f..0000000 --- a/app/javascript/utils/plugins/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./wiris"; diff --git a/app/javascript/utils/plugins/wiris.ts b/app/javascript/utils/plugins/wiris.ts deleted file mode 100644 index 53b3a3d..0000000 --- a/app/javascript/utils/plugins/wiris.ts +++ /dev/null @@ -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); -}; diff --git a/app/models/question.rb b/app/models/question.rb index b57791a..59e37aa 100644 --- a/app/models/question.rb +++ b/app/models/question.rb @@ -36,6 +36,8 @@ class Question < ApplicationRecord belongs_to :user belongs_to :subject, optional: true + has_many :review_requests, dependent: :destroy + has_many :review_messages, dependent: :destroy enumerize :status, in: %i[draft waiting_review with_requested_changes approved registered] enumerize :difficulty, in: %i[easy medium hard] @@ -52,4 +54,8 @@ class Question < ApplicationRecord ordering_or_ranking constant_alternatives ] + + def reviewer + review_requests.last&.user + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index f2d9d10..90017f0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,6 +8,7 @@ <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> <%= javascript_include_tag "application", "data-turbo-track": "reload", defer: true %> +