v2.15.0-cloud.1
🎉
Release

v2.15.0-cloud.1

Hasura Cloud
Nov 07 2022

Changelog

Highlights

Support for CockroachDB (beta)

We are pleased to announce the beta release for CockroachDB datasource on the Hasura GraphQL Engine. In this beta release Hasura supports Queries and Mutations with plans to add support for subscription before the GA release, which will coincide with the release of CockroachDB v22.2 (tentatively scheduled for early December).

CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data.

Together with Hasura, CockroachDB now supports: Instant GraphQL & REST APIs, Declarative Role Based Authorization, Advanced Security and Performance with rate limiting, allow lists, and caching.

Minimum Version Requirements

  • Hasura GraphQL engine v2.15.0 onwards

  • CockroachDB v22.2 onwards

ODBC Driver 18 for SQL Server

The ODBC Driver 18 for SQL Server is now installed. This allows users to provide ODBC Driver 18 connection strings. Because this version has native support for arm64/aarch64, this means that Hasura GraphQL Engine can now connect to a MS SQL Server database when running on macOS with an aarch64 chip (M1 or M2).

Action and Event Trigger Improvements

1. Action Response Transforms on Console

Response transformation for Actions has been available in the API. Now you can configure response transforms on the console (below the payload transform section of the Action creation form).

image

2. Support for optional query parameters

When defining optional query parameters for rest endpoints, if the input is empty, the query parameter is still attempted to be sent, which yields an error at most REST endpoints as mentioned in this issue. With this release, actions and event trigger REST connector query parameters are now optional. For more information please see documentation here.

3. Updates to JSON payload transformation templates

Transforming of payloads for Actions and Event Triggers in Hasura is achieved using the in-house developed templating language - kriti-lang. In this release we have updated it to version 0.3.3 which has the following changes:

  • Adds elif syntax to if expressions.
  • Improved error messaging and error codes.
  • Allow arbitrary expressions as range iteratee.
  • Adds Kriti.CustomFunctions.basicFuncMap functions to the kriti executable.
  • Adds KritiError type to exports from Kriti.

Elastic connection pools in Hasura cloud

A non-free tier cloud project is backend by several server instances that're autoscaled to ensure reliable API performance. When a project is scaled, now Hasura cloud will automatically resize the sources' pools to ensure total maximum connections across all server instances cannot exceed a limit. To specify the limit, we're introducing a new field, known as total_max_connections in connection settings of Postgres and MSSQL sources.

Now, the total_max_connections will take precedence over max_connections setting value. If neither is set, the total_max_connections assumes a default value.

Important: For all paid projects, if max_connections is explicitly set for a source connection, then set total_max_connections option to take advantage of autoscaling connection pools.

image

New Batch Limit for increased API Security

Batch operations are basically an array of operations and hence prone to Denial of Service (DoS) attacks by supplying a very large number of operations. As a result, we have introduced a new batch limit to avoid this scenario on the API Limits section of the Security tab.

image

Bug fixes and improvements

Server

  • Introduce a new experimental feature flag hide_aggregation_predicates which toggles off aggregation functions in where clauses, to be used if these cause schema type name conflicts.
  • Make action/event trigger REST connector query params optional
  • Postgres: change the name scheme for aggregation predicate types from <table name>_ <relation name>_aggregate to <relation table name>_aggregate_bool_exp, to avoid conflicting definitions with regular table selection aggregates.
  • add IF EXISTS while dropping the constraint in source migrations (2 -> 3)
  • fix remote relationship to remote schema sometimes being erroneously null when multiple relationships are defined on the same table / graphql object (fix #8345)
  • pg_dump has been upgraded in order to support PostgreSQL 15.
  • Add api limit - batch limit. batch limit - restricts the number of GraphQL operations for batched requests
  • close the WS connection in case of Apollo-ws protocol (protocol value: graphql-ws), when there is no authentication present (admin secret or unauthenticated role)

Console

  • Fix remote schema permissions with null default value
  • Fix remote schema permissions with interfaces
  • Fix remote schema permission when there are arguments
  • Add Batch on Security -> API Limits tab to tackle GraphQL batching attacks.
  • Fixes failures/indefinite loading during operation inspection in monitoring tab.
  • Show Total Max Connections pool settings fields on connect DB page
  • Enable the Add operation to allowlist button on the monitoring tab