I have consumed some GraphQL apis, but I have never built one myself. Thought this would be good opportunity to get started on it. Using StepZen felt like cheating though, made it a lot easier to built the apis.
What it does
This is a simple Web App listing the trending & upcoming Movies, TV shows and Actors and their details. User can favorite a movie, tv show or actor and the total favorites the item gets is shown to everyone.
How we built it
To get the movie listing The Movie Database (https://developers.themoviedb.org/) APIs were used. Additionally the favorite data is stored in MongoDB Atlas via Data API. The web app is built with React
The schemas can be found in https://github.com/arjun-g/stepzen-tmdb/tree/main/stepzen
Utilized the directives like materializer, sequence etc., which helped a lot in building some complex scenarios. (https://github.com/arjun-g/stepzen-tmdb/blob/main/stepzen/tmdb/movies.graphql https://github.com/arjun-g/stepzen-tmdb/blob/main/stepzen/tmdb/mongo.graphql)
Cloudflare pages is used to host the static page and proxy the StepZen graphql endpoint so that the auth key can be hidden. (https://github.com/arjun-g/stepzen-tmdb/blob/main/app/functions/api.js)
Accomplishments that we're proud of
I started the project a bit late but within a 3 days of time I was able to learn the basics of StepZen and built the app.
What we learned
Learned a lot on designing a GraphQL api and the best practices.
What's next for Movie/TV Guide
Some schema is still pending. Though the web app is for demonstration purpose, I want to publish a complete GraphQL api for TMDB with all the options available. Will push it in a separate open source github repo once that is done.
Log in or sign up for Devpost to join the conversation.