add new fields to serializer
This commit is contained in:
parent
0679fdc55f
commit
5b0570d289
3 changed files with 6 additions and 0 deletions
|
@ -177,6 +177,8 @@ type Avis {
|
|||
id: ID!
|
||||
instructeur: Profile! @deprecated(reason: "Utilisez le champ `claimant` à la place.")
|
||||
question: String!
|
||||
questionAnswer: Boolean
|
||||
questionLabel: String
|
||||
reponse: String
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ module Types
|
|||
|
||||
field :question, String, null: false, method: :introduction
|
||||
field :reponse, String, null: true, method: :answer
|
||||
field :question_label, String, null: true
|
||||
field :question_answer, Boolean, null: true
|
||||
field :date_question, GraphQL::Types::ISO8601DateTime, null: false, method: :created_at
|
||||
field :date_reponse, GraphQL::Types::ISO8601DateTime, null: true, method: :updated_at
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
class AvisSerializer < ActiveModel::Serializer
|
||||
attributes :answer,
|
||||
:introduction,
|
||||
:question_label,
|
||||
:question_answer,
|
||||
:created_at,
|
||||
:answered_at
|
||||
|
||||
|
|
Loading…
Reference in a new issue