Download tutorial as e-book ⚡️
Loading...

Aggregates

The section covers the implementation of basic aggregate functions (star_count and column_count) in an SQLite connector for Hasura.

It involves modifying the fetch_aggregates function to handle these aggregates, constructing a SQL query that applies the correct count functions, and ensuring that the query respects any specified conditions like predicates, sorting, or pagination.

The star_count aggregate counts all entries, while column_count counts non-null values in a specific column, with the option to count distinct values. The section concludes with testing the connector to ensure correct SQL generation and functionality.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2024 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin