March 2022 Summaries
5 posts from Hasura
Filter
Month:
Year:
Post Summaries
Back to Blog
This tutorial teaches how to manage user-generated files in a Hasura app using a microservice that employs an S3-compatible object storage. The storage microservice handles read and write permissions via JWT claims. It covers file uploads, listings, and downloads, as well as security measures like ensuring the same JWT secret is used by both Hasura and the storage microservice. Finally, it discusses deployment options such as DigitalOcean or AWS Lambda.
Mar 29, 2022
1,358 words in the original blog post.
Incremental Static Regeneration (ISR) is a new feature in Next.js 12.1 that allows developers to create and update pages on-demand. By pairing ISR with Hasura table events, web pages can be kept up-to-date and only rebuilt when data changes. This tutorial demonstrates how to set up an example blog app using Next.js and Hasura. First, the Hasura environment is configured by adding a SECRET_TOKEN in Docker Compose and creating a new table called "post" with columns for id, title, and content. Then, a Next.js typescript app is created, and getStaticProps data fetching is set up to query Hasura using graphql-request. Incremental Static Regeneration is enabled by setting up a webhook that tells Next.js to rebuild specific pages when the data changes. Finally, an event trigger is created in the Hasura console events tab, and Next.js is run in production mode. When a new post is added in Hasura, refreshing the Next.js app will display the updated data. The source code for this example can be found on GitHub.
Mar 17, 2022
606 words in the original blog post.
The text describes the creation of a real-time game for web using WebRTC and Hasura GraphQL subscriptions. The game was designed to be played on a large screen with players scanning a code to initiate a game request, while an admin could accept or reject these requests. To manage interactions between player, admin, and stage, subscriptions were used. However, subscription latency wasn't fast enough for actual gameplay mechanics, so WebRTC was employed for ultra-low-latency web connections. The text also explains the technical aspects of WebRTC, including offer/answer interchange in Session Description Protocol (SDP) and Interactive Connectivity Establishment (ICE). Hasura subscriptions were used to send offers and answers between devices. Lastly, gameplay data was stored in Hasura for accessing high-scores and player lists.
Mar 10, 2022
1,009 words in the original blog post.
Hasura now supports Prometheus, a popular observability tool designed for large-scale time-series data like metrics. The integration allows users to export and load their Hasura logs into a Prometheus instance for further analysis. Additionally, Hasura 2.2.1 is available across all Hasura projects, introducing features such as function field name customization, customizing root names per source (Namespaces), REST transforms, nested types in actions, support for MSSQL upserts and transaction status querying, OpenAPI spec for REST endpoints, and numerous patches and improvements.
Mar 03, 2022
478 words in the original blog post.
The #HasuraHackathon is a collaboration between Hashnode and Hasura that will take place in March 2022. Participants can learn GraphQL and build apps using Hasura to win prizes. There are five grand prizes worth $1000 each with goodies, and ten runner-up prizes worth $500 each with goodies. The hackathon begins on March 1st and ends on March 31st. Participants can join at any point as long as they submit their app before the deadline. To prepare for the event, beginners are recommended to take an Introduction to GraphQL course. After understanding the basics of GraphQL, participants can set up a backend with Hasura using a tutorial on Hasura Basics. They can then integrate the GraphQL backend with frontend apps using available tutorials in popular frameworks and languages. Potential app ideas for the hackathon include backend clones of popular apps, apps that use permission rules for data access, real-time apps using Hasura's subscriptions, and REST connectors. Support is available on the Hasura Discord channel dedicated to the hackathon.
Mar 02, 2022
505 words in the original blog post.