v2.26.0
版本发布时间: 2023-05-29 23:14:10
hasura/graphql-engine最新发布版本:v2.44.0(2024-10-08 18:36:54)
Changelog
Highlights
MySQL, MariaDB, Oracle, and Snowflake data connectors are now generally available (GA) (Cloud / Enterprise edition only)
We are delighted to announce that our MySQL, MariaDB, Oracle, and Snowflake data connectors are now generally available (GA). The MySQL, Oracle, and Snowflake data connectors support queries, table relationships, remote relationships, and permissions. In addition to these features MySQL and Oracle also support mutations (INSERT, UPDATE, DELETE).
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.
See docs.
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 Snowflake User-Defined Functions (Cloud / Enterprise edition only)
The Hasura GraphQL Engine now supports Snowflake User-Defined Functions. See docs.
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-urlencoded
values which arenull
-
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 driver tables with known slow performance with local relationship now default to use remote relationships. The currently affected driver is Snowflake. (Cloud / Enterprise edition only)
-
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 datasources. (Cloud / Enterprise edition only)
Bug fixes and improvements
Server
- A new
<kind>_track_tables
metadata 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_table
API calls, or placing multiple<kind>_track_table
requests into abulk
API call. - A new
<kind>_untrack_tables
metadata 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_table
API calls, or placing multiple<kind>_untrack_table
requests into abulk
API call. - The
get_table_info
for 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.
- Fix
event processing time
metrics calculation and removesZ
from thecreated_at
value 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) - 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_count
with labelstatus
which can have two possible valueshit
andmiss
. Exposed metric: (Cloud / Enterprise edition only)# 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 bug where remote relationships were being created instead of local relationships.
- Fix bug 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-urlencoded
payload when using OpenAPI imports. (Cloud / Enterprise edition only)
Data Connectors
- Fix errors in Snowflake queries caused by tables with non-uppercase names. (Cloud / Enterprise edition only)
- 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)
1、 cli-hasura-darwin-amd64 75.41MB
2、 cli-hasura-darwin-arm64 75.43MB
3、 cli-hasura-linux-amd64 23.5MB
4、 cli-hasura-linux-arm64 22.05MB
5、 cli-hasura-windows-amd64.exe 69.27MB