Open
Description
We need to create a new GraphQL view that returns the winners of each contest held.
The response must be a set of contests with at least one winner, with each contest containing the list of winners. With which winner we also want the contest submission that the user won the contest with, which must include the picture (name and file) and the number of votes received. Consider the following JSON representation of the expected result:
{
"title": string,
"description": string,
"prize": string,
"voting_draw_end": string,
"winners": [
{
"name_first": string,
"name_last": string,
"submission": {
"picture": {
"name": string,
"file": string,
}
"number_votes": int
}
}
]
}
The response must be ordered by the date the contest ended.