Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hschne/graphql-groups-demo
A demo project for graphql-groups
https://github.com/hschne/graphql-groups-demo
demo graphql-ruby grapqhl heroku ruby ruby-gem
Last synced: 23 days ago
JSON representation
A demo project for graphql-groups
- Host: GitHub
- URL: https://github.com/hschne/graphql-groups-demo
- Owner: hschne
- Created: 2020-07-30T18:50:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T20:15:11.000Z (almost 2 years ago)
- Last Synced: 2024-10-09T22:33:12.731Z (about 1 month ago)
- Topics: demo, graphql-ruby, grapqhl, heroku, ruby, ruby-gem
- Language: Ruby
- Homepage: https://graphql-groups-demo.herokuapp.com/
- Size: 3.45 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Demo for GraphQL Groups
To showcase [graphql-groups](https://github.com/hschne/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/](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`](./app/graphql/types/movie_group_type.rb) and [`movie_group_result_type`](./app/graphql/types/movie_group_result_type.rb)
for the implementation.#### Movie count per on runtime
```graphql
query runtimeCount{
groupBy {
runtime {
key
count
}
}
}
```#### Average revenue of all movies per year
```graphql
query revenueAverage{
groupBy {
releaseDate(timeframe:YEAR) {
key
count
avg {
revenue
}
}
}
}
```#### Movies per rating per year, as well as minumum and maximum budget per group
```graphql
query yearRatingBudgets {
groupBy {
releaseDate(timeframe:YEAR) {
key
groupBy {
popularity {
key
count
max {
budget
}
min {
budget
}
}
}
}
}
}
```