fix question alternative type
This commit is contained in:
@@ -1,12 +1,10 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Types
|
module Types
|
||||||
module Questions
|
class QuestionAlternativeType < Types::BaseObject
|
||||||
class Alternative < Types::BaseObject
|
graphql_name "QuestionAlternative"
|
||||||
graphql_name "QuestionAlternative"
|
|
||||||
|
|
||||||
field :correct, Boolean, null: false
|
field :correct, Boolean, null: false
|
||||||
field :text, String, null: true
|
field :text, String, null: true
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ module Types
|
|||||||
global_id_field :id
|
global_id_field :id
|
||||||
field :user_id, Integer, null: false
|
field :user_id, Integer, null: false
|
||||||
field :subject_id, Integer
|
field :subject_id, Integer
|
||||||
field :alternatives, GraphQL::Types::JSON, null: false
|
|
||||||
field :authorship, String
|
field :authorship, String
|
||||||
field :authorship_year, String
|
field :authorship_year, String
|
||||||
field :body, String
|
field :body, String
|
||||||
@@ -18,6 +17,7 @@ module Types
|
|||||||
field :intention, String
|
field :intention, String
|
||||||
field :references, String
|
field :references, String
|
||||||
field :support, String
|
field :support, String
|
||||||
|
field :alternatives, [Types::QuestionAlternativeType], null: false
|
||||||
field :bloom_taxonomy, Enums::QuestionBloomTaxonomyEnum
|
field :bloom_taxonomy, Enums::QuestionBloomTaxonomyEnum
|
||||||
field :check_type, Enums::QuestionCheckTypeEnum
|
field :check_type, Enums::QuestionCheckTypeEnum
|
||||||
field :difficulty, Enums::QuestionDifficultyEnum
|
field :difficulty, Enums::QuestionDifficultyEnum
|
||||||
|
|||||||
Reference in New Issue
Block a user