July 2019 Summaries
10 posts from Hasura
Filter
Month:
Year:
Post Summaries
Back to Blog
Optimistic UI is a front-end development paradigm where after making a mutation request to an API, the client updates the UI optimistically assuming that the request will be successful. This approach can make the UI seem faster even with network bottlenecks. However, it may lead to clobbering, where a source of data is overwritten due to side effects. To avoid this problem, each mutation should be associated with a unique comparable identifier such as a timestamp or a number. This allows checking for stale data before updating the UI and ensures that the UI goes through the correct states when handling multiple mutations in quick succession.
Jul 31, 2019
1,014 words in the original blog post.
FASTCUP, an esports league app, built a high-performance app with a complex database schema using GraphQL and Hasura. The app allows users to play Counter-Strike matchups against other teams on their game servers, with custom anti-cheating measures and rank-based matchmaking. FASTCUP leveraged GraphQL, Hasura, Postgres, and Event Triggers to build a fast, realtime app. They chose Hasura for its speed, performance, and auto-generated CRUD GraphQL API over their database schema. The team believes that Hasura has significantly contributed to their feature throughput and is actively shaping the product roadmap with feedback on enhancements for event triggers and access control patterns.
Jul 30, 2019
512 words in the original blog post.
This post discusses the use of Hasura Remote Joins to join data from Google Sheets API and Postgres in GraphQL. It is part of a series on Remote Joins, which allows joining data across tables and remote data sources. Data Federation using Hasura Remote Joins is now available in v1.3.0 stable release. The example demonstrates how to add Google Sheets API as a Remote Schema using the Hasura Console and deploy a custom resolver. By adding the Google Sheets API endpoint as a remote schema, users can fetch data from both Postgres and Google Sheets in a single GraphQL query. This technique opens up various use-cases for application development.
Jul 30, 2019
428 words in the original blog post.
In this tutorial, we will learn how to build a music playlist app with Gatsby, Contentful, and Hasura Remote Joins. The app uses a Postgres database for storing metadata about music tracks, albums, playlists, and users, which is queried using Hasura GraphQL. Audio source files are stored in Contentful, and user authentication is handled by Auth0.
The schema of the music playlist app includes an album table with multiple tracks, a playlist table linked to a user via the user table, and track information stored in Postgres but managed through Contentful. To merge data from these multiple sources, we will use Hasura Remote Joins.
To get started, deploy GraphQL Engine on Hasura Cloud and set up PostgreSQL via Heroku. Then, configure Auth0 for authentication. Next, create necessary content types in Contentful for Tracks and add the required fields. Add Contentful as a Remote Schema in Hasura Console using the appropriate endpoint and access token.
Create a remote relationship from the playlist_track table to the tracksCollection type of Contentful, ensuring that only relevant audio track information is fetched. Finally, use role-based permissions to manage app data access and permissions. Insert sample data to see how the response structure looks like for the GraphQL query.
Jul 26, 2019
739 words in the original blog post.
BBVA Innovation Labs has developed an open source security tool called Deeptracy using GraphQL and Hasura. The adoption of these technologies significantly reduced build time, app extensibility, and documentation requirements. Deeptracy is designed to analyze security issues in third-party libraries used in a project by choosing the most suitable security tool for each language and notifying development teams of vulnerabilities found in project dependencies. By adopting GraphQL, BBVA addressed key issues such as reducing support activities and envisioning future use cases. The adoption of Hasura further reduced Roberto's development time from 2 months to about 3 weeks.
Jul 22, 2019
443 words in the original blog post.
Hasura is a scalable GraphQL engine on Postgres that provides instant APIs with authorization. It supports live queries for clients over GraphQL subscriptions. In a test setup, Hasura handled 1 million active live queries while maintaining under 28% load on Postgres and around 850 peak connections. The architecture enabling this performance is detailed in their GitHub repo.
Jul 17, 2019
208 words in the original blog post.
This article discusses using Hasura Remote Joins to join geography data from PostGIS extension in a Postgres database with Google Places API in GraphQL. It explains how to enable the PostGIS extension on Postgres and insert sample user location data. The author then demonstrates how to fetch nearby restaurants' information using Google Places API as a REST API, adding it as a Remote Schema in Hasura Console. Finally, the article provides an example of a GraphQL query that fetches this data in a single API call by joining the Postgres and Google Places API data.
Jul 12, 2019
511 words in the original blog post.
KintoHub is a workflow service that manages cloud-native application lifecycle from source to production. It uses Hasura and GraphQL to power its real-time API infrastructure, enabling efficient management of APIs, microservices, databases, and tasks through an interactive dashboard. The team initially built an MVP using MongoDB but switched to Hasura due to scalability issues. They now leverage Hasura's GraphQL API for real-time data access across various services/workflows. The adoption of Hasura has significantly reduced development time, and the resulting cloud-native deployment management service is 40% faster than its predecessor.
Jul 11, 2019
602 words in the original blog post.
The next edition of GraphQL Contributor Days is set to take place on August 8, 2019. This frontend frameworks-focused event will be fully online and live-streamed, allowing participants from all over the world to join in. The event aims to foster cross-collaboration among different communities using GraphQL and provide a platform for key developers working on GraphQL to share their experiences and insights. Topics to be discussed include getting started with GraphQL, maintaining a GraphQL app, API lifecycle management, and more. Notable guests at the event will include Tracy Lee, Rajoshi Ghosh, Tanmai Gopal, Ryan Chenkie, Carlos Rufo, Sara Vieira, Mark Stuart, Shruti Kapoor, Christina Yu, Joey Nenni, Gabriel McAdams, Eve Porcello, and Alex Banks. The event will be live-streamed from 9am - 1pm PST.
Jul 10, 2019
353 words in the original blog post.
Contentful, an API-first CMS, can be integrated with Hasura using GraphQL and Remote Joins to create applications with rich content, such as a blog CMS or a playlist app. By using Hasura's Remote Joins feature, which is in preview, developers can join data across tables and remote sources, like combining user data from Hasura with blog post data from Contentful. The process involves creating content types in Contentful, such as a Blog Post with fields like title and content, and connecting this data to Hasura’s users table via the author field. To facilitate querying, Contentful is added as a Remote Schema in Hasura, requiring a GraphQL Content API Endpoint and an access token for authorization. A remote relationship is established from the users table to the Contentful blogPostCollection, allowing for queries that retrieve only the relevant blogs authored by specific users, thus demonstrating the seamless integration of remote content into a cohesive application.
Jul 04, 2019
501 words in the original blog post.