Skip to content

hschne/graphql-groups-demo

Repository files navigation

Demo for GraphQL Groups

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.

Movie count per on runtime

query runtimeCount{
  groupBy {
    runtime {
      key
      count
    }
  }
}

Average revenue of all movies per year

query revenueAverage{
  groupBy {
     releaseDate(timeframe:YEAR) {
      key
      count
      avg {
        revenue
      }
    }
  }
}

Movies per rating per year, as well as minumum and maximum budget per group

query yearRatingBudgets {
  groupBy {
     releaseDate(timeframe:YEAR) {
      key
      groupBy {
        popularity {
          key
          count
          max {
            budget
          }
          min {
            budget
          }
        }
      }
    }
  }
}

Releases

No releases published

Packages

No packages published

Languages