fix question alternative type

This commit is contained in:
João Geonizeli
2022-07-21 16:49:40 -03:00
parent 54e2db46f1
commit 4f77e0413b
2 changed files with 5 additions and 7 deletions

View File

@@ -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

View File

@@ -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