Comparison with Hasura
General differences
- Airsequel does not currently support nested boolean expressions for filtering (i.e. expressions involving
oroperators and the like). When querying, this can be worked around using views. Moreover, Airsequel does not currently have a dedicatedis_nullfiltering field (although the same functionality can be replicated using_eq: null). - Hasura will fail when attempting to create tables
<name>and<name>_by_pk(it is not clear what happens when attempting to import a database which already contains two such tables). Airsequel will simply append underscores to the name of queries/mutations until one that doesn't conflict with a table name has been found. This has the advantage of supporting imports of as many existing databases as possible.
Reads
- The
order_byparameter consists of an array of records in both Airsequel and Hasura. While Hasura offers more granular control over where the nulls should be placed among the results (at the start/end), the main two options (ascanddesc) work the same way as they do in Airsequel (although in Airsequel the aforementioned lowercase enum variants have been deprecated in favour ofASCandDESCrespectively). - While our GraphQL API does not offer a direct way to perform joins, the
distinct_onparameter, and aggregate queries, the functionality can be replicated using views.
Inserts
- The
on_conflictparameter is similar across engines, although Airsequel allows passing in an array containing more than one such clause (while Hasura allows at most one). - While our GraphQL API does not support
insert_onemutations, the basicinsertmutations can be used instead.
Updates
In
update_<name>_by_pkmutations, Hasura'spk_columnsrecord exists instead as a flattened set of arguments in Airsequel. That is, the following two mutations are equivalent in their respective engines:mutation Hasura { update_users_by_pk( pk_columns: { email: "john@example.com" } _set: { name: "John Doe" } ) { affected_rows } } mutation Airsequel { update_users_by_pk(email: "john@example.com", _set: { name: "John Doe" }) { affected_rows } }When a column named
_setexists in the table, the_setparameter will have underscores appended to its name until the name is free to use.While our GraphQL API does not support
update_<name>_manymutations (nor their_by_pkvariation) directly, one can perform the individual mutations sequentially instead.Similarly, one can replicate the not currently supported
_incparameter (for incrementing numeric values) by performing the updates using the REST query api instead.
Deletes
There are no delete-specific differences between the two engines.