November 2019 Summaries
5 posts from Hasura
Filter
Month:
Year:
Post Summaries
Back to Blog
This article discusses handling errors in GraphQL APIs using Hasura and React. Unlike REST APIs, GraphQL API responses do not contain numerical codes by default, making it important for developers to understand the errors and how these errors are handled by their GraphQL tool of choice. The article covers common errors experienced in GraphQL APIs, handling GraphQL errors while building APIs with Hasura, and building custom error pages on a client-side React app. It also explains various categories of GraphQL errors, such as server errors, client errors, errors in the parse/validation phase of queries, and errors thrown within resolvers. The article provides examples of how to handle these errors using Apollo-link-error and apollo/react-hooks libraries. Additionally, it discusses handling errors at top levels and component levels, as well as error policies for handling partial data with errors in custom resolvers.
Nov 26, 2019
2,267 words in the original blog post.
This post discusses implementing full text search with Hasura GraphQL API using Postgres features. It covers different approaches to full text search in Postgres, such as using LIKE and ILIKE operators, searching on multiple columns, built-in Full Text Search, fuzzy search, and access control for search. The post also provides examples of how to create a Postgres function for fuzzy search and apply role-based permissions for search functionality. Additionally, it mentions integrating ZomboDB extension for more advanced use cases in the next post.
Nov 26, 2019
965 words in the original blog post.
This post discusses different pagination techniques and types used in applications with Hasura GraphQL queries. Offset-based pagination is a popular technique where the client makes requests with limit (number of results) and offset (records to skip). However, it has performance issues when dealing with large datasets and may result in duplicate or missing items due to frequent data updates. Cursor/keyset pagination overcomes these limitations by returning a pointer to a specific record in the dataset, ensuring no duplicate results are fetched. The post also covers different pagination types such as numbered pagination, infinite scroll/load more, and limit in nested objects. Choosing the right approach for pagination depends on the use case and whether the data is frequently updated or not.
Nov 25, 2019
1,400 words in the original blog post.
Saigar Technologies has developed Saigar CE, a crowdsourced intelligence platform that utilizes OSINT (Open Source Intelligence) to collect and process publicly available data. The platform is designed for use in cases such as missing persons investigations. Saigar chose GraphQL and Hasura to build the platform due to their feature velocity, real-time data support, security features, and scalability. Hasura enabled quick schema creation and reduced backend implementation concerns, allowing the team to focus on product development.
Nov 20, 2019
810 words in the original blog post.
The text discusses customizing and aliasing GraphQL fields with Hasura. It explains the difference between server-side field name customization and client-side GraphQL aliasing. The article provides examples of how to use GraphQL aliases to rename result fields in a query, making it easier to map responses directly to UI elements without transformations on the frontend. Additionally, it highlights scenarios where aliases are necessary for queries with different arguments. Furthermore, the text introduces server-side customization with Hasura, allowing users to modify field names at the server level and use their preferred naming conventions like camelCase or snake_case without worrying about the underlying Postgres schema.
Nov 18, 2019
759 words in the original blog post.