To showcase graphql-groups this demo project allows you to retrive statistical data surrounding a dataset of movies. You can play around with it here: https://graphql-groups-demo.herokuapp.com/
Movies have attributes like revenue, their release date and so on. See the queries below for some inspiration of what kind of information you can retrieve.
Then check movie_group_type
and movie_group_result_type
for the implementation.
query runtimeCount{
groupBy {
runtime {
key
count
}
}
}
query revenueAverage{
groupBy {
releaseDate(timeframe:YEAR) {
key
count
avg {
revenue
}
}
}
}
query yearRatingBudgets {
groupBy {
releaseDate(timeframe:YEAR) {
key
groupBy {
popularity {
key
count
max {
budget
}
min {
budget
}
}
}
}
}
}