๐น In this three-part video series, we build a Unity leaderboard with Hasura!
Follow along as Baris Tumerkan, a Unity dev who is learning GraphQL, and Sezgi Ulucam, a GraphQL dev with no Unity experience, team up to solve this challenge together ๐ช
We both learned a lot from this project (Sez about Unity, and Baris about GraphQL). The best parts were:
- Discovering how easy it is to set up queries, mutations, and subscriptions with this Unity GraphQL client by Tade Ajiboye. Import the package, plug in your Hasura endpoint, and youโre good to go!
- Building and testing out our GraphQL operations in the Hasura console.
- Running into bugs in our code and crushing them along the way โ so you don't have to ๐
- Seeing our project start to come together โ especially the live scores!
- Using Hasura Actions to customize business logic for high scores.
- Naming our imaginary players after pets... who were named after foods. Because why not? ๐น๐ฉ
If you'd like to code along at home, check out the repo here.
Part 1: Queries & Mutations
In this video, we:
๐ฎ Set up our Postgres database with Hasura
๐ฎ Hook up our GraphQL client
๐ฎ Set up GraphQL queries and mutations for our leaderboard
Part 2: UI & Subscriptions
In this video, we:
๐ฎ Display top scores on our leaderboard UI
๐ฎ Show live scores on our leaderboard with GraphQL subscriptions
Part 3: High Scores with Hasura Actions
In this video, we implement business logic for high scores using Hasura Actions! With this feature, scores are only updated when they increase.
We hope you had fun watching and coding along, and that you were inspired to build your own Unity projects using Hasura. And if you do, please share in the comments. We'd love to hear about them!
You can also join us on Discord for more discussions on Hasura & GraphQL!
Sign up for our newsletter to know when we publish new articles.
Top comments (0)