v2.26.0-beta.1
Pre-releaseChangelog
Highlights
Introducing Logical Models and Native Queries (Cloud / Enterprise edition only)
This feature is in beta. We welcome your feedback!
The Hasura GraphQL Engine automatically generates a schema that includes fields for querying, mutating, and subscribing to data changes and events, but sometimes you need more flexibility over your data model. We are announcing two new features which combine to handle any use case you can think of:
-
Logical Models allows you to define custom GraphQL types that don't directly map to a database object, giving you more flexibility and control over your Hasura-generated GraphQL schema.
-
With Native Queries, you'll be able to harness the full power of SQL within Hasura without the need to create database objects that require DDL privileges.
You might find Native Queries useful for many reasons:
- Use the full power of SQL that Hasura might not provide access to through the typical table API, such as
GROUP BY, window functions, or scalar functions. - Provide custom arguments to the users of your API to greatly expand its flexibility.
- Encapsulate sophisticated filtering with a query, allowing your users to provide a single argument rather than having to understand how to manipulate the data.
- Work with the advanced features of your database to improve performance.
- Write a compatibility layer around tables, making it easier to change your API without breaking existing clients.
- Reduce duplication by moving common data manipulation into one place.
Read the docs and check out both of these new features in our May Community Call!
Support for SQL Server stored procedures (Cloud / Enterprise edition only)
This feature is in beta. We welcome your feedback!
The Hasura GraphQL Engine can now track read-only SQL Server Stored Procedures using the new Logical Models feature. This allows you to define custom GraphQL types directly in the Hasura GraphQL Engine, to define the result set returned from the stored procedure, and automatically generate a GraphQL root field for querying it.
Support for caching Remote Schemas and Actions when forwarding client headers (Cloud / Enterprise edition only)
Previously, Hasura would not cache Remote Schemas and Actions when forward_client_headers setting was set to true. Now, this limitation has been removed, by adding the client headers as part of the cache key. Now one can use @cached with Remote Schema or Action queries.
Behaviour changes
-
In Action payload transformation, GraphQL Engine will now ignore the
x-www-form-urlencodedvalues which arenull
-
Fix
event processing timemetrics calculation and removesZfrom thecreated_atvalue in the payload sent by the Event Trigger to reflect that the time in the payload may or may not represent a UTC Time. (For e.g., It's DB local time in PG and UTC time in MSSQL) -
Removes the deprecated MySQL implementation. Customers using the deprecated implementation will need to upgrade to the new MySQL implementation based on GraphQL Data Connectors.
-
Data Connector DB connections will now be closed when idle for 10 minutes, and connections swapped for new ones when reaching 2 hours alive. This is to prevent issues with timeouts and long-lived connections in certain data sources. (Cloud / Enterprise edition only)
Bug fixes and improvements
Server
- A new
<kind>_untrack_tablesmetadata API has been added that allows untracking of multiple tables in one API request (docs). This is typically faster than issuing multiple single<kind>_untrack_tableAPI calls, or placing multiple<kind>_untrack_tablerequests into abulkAPI call. - A new
<kind>_track_tablesmetadata API has been added that allows tracking of multiple tables in one API request (docs). This is typically faster than issuing multiple single<kind>_track_tableAPI calls, or placing multiple<kind>_track_tablerequests into abulkAPI call. - The
get_table_infofor Data Connector backends can now be called as a prefixed command, such assqlite_get_table_info. - Add HTTP response status to the context of response transforms in Actions and Event Triggers.
- Properly scope root-table references in permissions appearing in boolean expressions on relationships (fix #9283)
- Add additional error information to the output when an HTTP Exception Error is thrown during Action and Remote Schema execution in dev mode.
- Add new Prometheus metrics
hasura_subscription_total_time_seconds,hasura_subscription_db_execution_time_seconds. (Cloud / Enterprise edition only) - Add a new Prometheus metric
hasura_events_fetched_per_batch. (Cloud / Enterprise edition only) - Add a new Prometheus metric to track cache hit-and-miss requests:
hasura_cache_request_countwith labelstatuswhich can have two possible valueshitandmiss. (Cloud / Enterprise edition only)
Exposed metric:# HELP hasura_cache_request_count Total number of incoming requests for cache lookup # TYPE hasura_cache_request_count counter hasura_cache_request_count{status="hit"} 0.0 hasura_cache_request_count{status="miss"} 0.0 - Add configuration for high-cardinality labels for Prometheus metrics (metrics with dynamic labels) (Cloud / Enterprise edition only)
Console
- Add a feature flag to enable the new permissions user interface
- Fix issue with renaming databases via the connection management screen
- Fix object suggested relationships being tracked as array relationships
- Fix bugs where we wrongly mapped and filtered currently supported relationships.
- Add a percentage progress indicator while tracking/un-tracking large number of tables in Data Connector-backed databases.
- Improve handling of connection issues to Data Connector-backed sources. (Cloud / Enterprise edition only)
- Display a pop-up for users to use caching for queries slower than 1s in API Explorer. (Cloud / Enterprise edition only)
- Add support for
x-www-form-urlencodedpayload when using OpenAPI imports. (Cloud / Enterprise edition only)
Data Connectors
- Fix a bug where database foreign keys defined with non-alphanumeric or underscored names caused Snowflake/Oracle/MySQL/MariaDB data source connection errors. (Cloud / Enterprise edition only)