UpdateQuestionInput
GraphQL input type for updating an existing question. All fields are optional to support partial updates.
const updateData = { content: "What is your favorite animal?", type: TypeOfQuestion.CHECKBOX, answers: ["Cat", "Dog", "Bird"]} Copy
const updateData = { content: "What is your favorite animal?", type: TypeOfQuestion.CHECKBOX, answers: ["Cat", "Dog", "Bird"]}
Decorators used:
@InputType()
@Field()
Optional
Updated predefined answers
New set of answers for the question, stored as a JSON array.
Updated content of the question
New text for the question, must be unique if changed.
Question ID
ID of the question to update.
Updated type of question
New type for the question (e.g. text, radio, checkbox).
UpdateQuestionInput
Description
GraphQL input type for updating an existing question. All fields are optional to support partial updates.
Example
Decorators used:
@InputType()
: Declares the class as a GraphQL input type.@Field()
: Exposes a class property as a GraphQL input field.