github hasura/graphql-engine v2.0.0-alpha.8

latest releases: v2.39.1, cli/v2.39.1, v2.39.0...
pre-release3 years ago

Changelog

Issues with upgrade from alpha.7 : There is an issue upgrading to this version from the previous version i.e. v2.0.0-alpha.7: #6802 . We will release another version ASAP.

Support for 3D PostGIS Operators

We now support the use of the functions ST_3DDWithin and ST_3DIntersects in boolean expressions.
Note that ST_3DIntersects requires PostGIS be built with SFCGAL support which may depend on the PostGIS distribution used.

Support for null values in boolean expressions

In v2, we introduced a breaking change, that aimed at fixing a long-standing issue: a null value in a boolean expression would always evaluate to True for all rows. For example, the following queries were all equivalent:

delete_users(where: {_id: {_eq: null}})  # field is null, which is as if it were omitted
delete_users(where: {_id: {}})           # object is empty, evaluates to True for all rows
delete_users(where: {})                  # object is empty, evaluates to True for all rows
delete_users()                           # delete all users

This behaviour was unintuitive, and could be an unpleasant surprise for users that expected the first query to mean "delete all users for whom the id column is null". Therefore in v2, we changed the implementation of boolean operators to reject null values, as we deemed it safer:

delete_users(where: {_id: {_eq: null}})  # error: argument of _eq cannot be null

However, this change broke the workflows of some of our users who were relying on this property of boolean operators. This was used, for instance, to conditionally enable a test:

query($isVerified: Boolean) {
  users(where: {_isVerified: {_eq: $isVerified}}) {
    name
  }
}

This release provides a way to revert the engine to its previous behaviour: if the HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE environment variable is set to "true", null values in boolean expression will behave like they did in v1 for the following operators: _is_null, _eq, _neq, _in, _nin, _gt, _lt, _gte, _lte.

Bug fixes and improvements

  • server: all /query APIs now require admin privileges (Important security fix for MSSQL)
  • server: add a new /dev/rts_stats endpoint, enabled when hasura is started with '+RTS -T'
  • server: re-enable a default HASURA_GRAPHQL_PG_CONN_LIFETIME of 10min
  • server: support for bigquery datasets
  • server: format the values of injectEventContext as hexadecimal string instead of integer (fix #6465)
  • server: add "kind" field to query-log items. Kind can be "database", "action", "remote-schema", "graphql", "cached", or "subscription".
  • console: add custom_column_names to track_table request with replaced invalid characters
  • console: add details button to the success notification to see inserted row
  • console: add request preview for REST endpoints
  • cli: fix errors being ignored during metadata apply in config v3 (fix #6784)

Don't miss a new graphql-engine release

NewReleases is sending notifications on new releases.