queries:
- survey
- arguments: survey_type, example: intial_lda, middle_lda, end_lda
- NOTE: subquestions in the below query denote options for the questions. is_main_question is a boolean key that helps in distinguishing questions and subquestions.
example:
query LDASurvey {
survey(survey_type: "intial_lda") {
id
survey_questions {
id
is_main_question
is_mandatory
position
question_type
question_text
subquestions {
id
position
question_text
question_type
}
sanitize_meta
leadership_value {
id
name
meta
}
}
}
}
- lda_report
- arguments: survey_uuid, description: can be obtained from opportunity_application query.
example:
query LDASurveyReport {
ldaReport(survey_uuid: "6fc50732-d9ae-47dc-a79b-4d821a89eaec") {
id
associated_surveys {
survey {
survey_type
}
survey_uuid
report {
score
}
}
can_fill
survey {
id
title
}
report {
leadership_value {
name
meta
}
score
}
survey_uuid
completed_at
opportunity_application {
id
opportunity {
title
}
person {
full_name
}
}
}
}
- added 3 more fields in opportunity_application type.
example:
query OpportunitApplication {
getApplication(id: 42) {
id
intial_lda_report {
id
completed_at
can_fill
survey_uuid
}
middle_lda_report {
id
completed_at
can_fill
survey_uuid
}
end_lda_report {
id
completed_at
can_fill
survey_uuid
}
}
}
mutation:
- survey_answer
- arguments: survey_uuid, description: can be obtained from opportunity_application or lda_report query.
- arguments: responses, description: takes an array of objects with question_id and answer (which will be scored from range 1 to 5).
example:
mutation CreateSurvery {
surveyAnswer(
survey_uuid: "73c889bd-a677-4c83-8f6b-a46589ab2199"
responses: [
{ question_id: "365", answer: "1" }
{ question_id: "371", answer: "3" }
{ question_id: "377", answer: "2" }
{ question_id: "383", answer: "5" }
{ question_id: "389", answer: "4" }
{ question_id: "395", answer: "4" }
]
)
}