这是indexloc提供的服务,不要输入任何密码
Skip to content

Releases: hasura/graphql-engine

v2.9.0

27 Jul 15:12

Choose a tag to compare

Changelog

Event Triggers for MS SQL Server

(closes #7228)

Event Triggers support has been added for MS SQL Server. Now, you can invoke external webhooks on insert/update/delete events on your MS SQL Server tables. See the docs for more details.

Bug fixes and improvements

  • server: Support limit in BigQuery computed fields (fix #8562)
  • server: Improve GraphQL query parsing time and per-query memory allocation
  • server: Fix dropping column from a table that has update permissions (fix #8415)
  • server: Fix unsupported/unknown datatype was returned error thrown when using mssql_redeliver_event API
  • server: Fix bug with MS SQL Server events and shutdown handler
  • server: Fix bug where Hasura SQL trigger was not dropped when an MS SQL Server database is dropped
  • server: Allow all argument types for BigQuery routines
  • console: Add support for computed fields with session arg in permission builder (fix #8321)
  • console: Add GraphQL field customization for new database connections (root fields namespace, prefix, and suffix, and type names prefix and suffix)
  • console: Fix notifications not being shown in certain cases on the console on Hasura Cloud
  • console: Allow schemas prefixed with pg, but not pg_ (fix #8435)
  • console: Introduce new table relationships UI in alpha
  • cli: Fix error reporting in metadata apply command (#8280)

v2.9.0-beta.3

20 Jul 16:10

Choose a tag to compare

v2.9.0-beta.3 Pre-release
Pre-release

Changelog

Bug fixes and improvements

  • server: Fix bug where Hasura SQL trigger was not dropped when an MS SQL Server database is dropped
  • server: Allow all argument types for BigQuery routines
  • console: Fix notifications not being shown in certain cases on the console on Hasura Cloud

v2.9.0-beta.2

13 Jul 15:58

Choose a tag to compare

v2.9.0-beta.2 Pre-release
Pre-release

Changelog

Bug fixes and improvements

  • server: fix dropping column from a table that has update permissions (fix #8415)
  • server: fix unsupported/unknown datatype was returned error thrown when using mssql_redeliver_event API
  • server: fix bug with MSSQL events and shutdown handler

v2.8.4

07 Jul 10:44

Choose a tag to compare

Changelog

This is a patch release for v2.8.3

Bug fixes and improvements

  • server: Add support to customize the root field for streaming subscriptions (fixes #8618)

v2.8.3

30 Jun 14:04

Choose a tag to compare

This is a patch release for v2.8.2

Changelog

Bug fixes and improvements

  • cli: fix performance regression with large metadata in metadata apply

    During the execution of metadata apply command, the YAML metadata is
    converted into JSON format because the server API accepts metadata in JSON
    format. For large metadata(> ~20k LOC), due to a recent change this conversion was
    taking upwards of 2 minutes of time, increasing exponentially with metadata size.
    With the changes in this release, the performance regression has been fixed.
    Following is a benchmark comparison of time taken for YAML to JSON conversion
    before and after the changes for different metadata sizes:

    Metadata size(LOC) Before(seconds) After(seconds)
    10k 8.7 0.22
    20k 15.9 0.29
    50k 89.5 0.52
    100k 271.9 0.81
    300k - 2.3

v2.8.2

29 Jun 18:31

Choose a tag to compare

This is a patch release for v2.8.1

Changelog

  • server: revert allow casting most postgres scalar types to strings in comparison expressions (#8617)

v2.9.0-beta.1

21 Jun 14:30

Choose a tag to compare

v2.9.0-beta.1 Pre-release
Pre-release

Changelog

Event Triggers for MS SQL Server

(closes #7228)

Event Triggers support has been added for MS SQL Server. Now, you can invoke external webhooks on insert/update/delete events on your MS SQL Server tables. See the docs for more details.

Bug fixes and improvements

  • server: support limit in BigQuery computed fields (fix #8562)
  • server: improve GraphQL query parsing time and per-query memory allocation
  • console: allow schemas prefixed with pg, but not pg_ (fix #8435)
  • console: add support for computed fields with session arg in permission builder (fix #8321)
  • console: add GraphQL field customization for new database connections (root fields namespace, prefix, and suffix, and type names prefix and suffix)
  • console: introduce new table relationships UI in alpha
  • cli: fix performance regression with large metadata in metadata apply
  • cli: fix error reporting in metadata apply command (#8280)

v2.8.1

21 Jun 13:25

Choose a tag to compare

This is a patch release for v2.8.0

Changelog

  • server: fix bug that had disabled expression-based indexes in Postgres variants (fix #8601)

v2.8.0

15 Jun 17:39

Choose a tag to compare

Changelog

Disabling query/subscription root fields

When a table is tracked in graphql-engine, three root fields are generated automatically
namely <table>, <table>_by_pk and <table>_aggregate in the query and the subscription
root. You can now control which root fields are exposed for a given role by specifying them in the select permission.
See docs.

The main use-case for this feature is to disable APIs that access the table directly but which still need to be tracked so that:

  1. It can be accessed via a relationship to another table
  2. It can be used in select permissions for another table via a relationship

For such use-cases, we can disable all the root fields of the given table. This can be done by setting the select permission as follows:

{
   "role": "user",
   "permission": {
     "columns": [
       "id",
       "name"
     ],
     "filter": {},
     "allow_aggregations": true,
     "query_root_fields": [],
     "subscription_root_fields": []
   }
 }

Another use-case is to allow a role to directly access a table only
if it has access to the primary key value. This can be done by setting the select permission as follows:

{
   "role": "user",
   "permission": {
     "columns": [
       "id",
       "name"
     ],
     "filter": {},
     "allow_aggregations": false,
     "query_root_fields": ["select_by_pk"],
     "subscription_root_fields": ["select_by_pk"]
   }
 }

Note that console support for this permission will be released later.

Introducing naming conventions (experimental)

Now, users can specify the naming convention of the auto-generated names in the HGE.
This is an experimental feature (enabled by setting HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: naming_convention) and is supported for postgres databases only for now. See docs.

There are two naming conventions possible:

Naming Convention Field names Type names Arguments Enum values
hasura-default Snake case Snake case Snake case as defined
graphql-default Camel case Pascal case Camel case Uppercased

Suppose there is a table called my_table and it has columns id, date_of_birth, last_seen, then with
graphql-default naming convention we will get the following auto-generated API:

query {
  myTable(orderBy: {dateOfBirth: asc}, limit: 10) {
    id
    dateOfBirth
    lastSeen
  }
}

To configure the naming convention for a source, set the naming convention in source
customisation while adding the source:

{
  "resource_version": 2,
  "metadata": {
    "version": 1,
    "sources": [
      {
        "name": "default",
        "kind": "postgres",
        "tables": [],
        "configuration": {},
        "customization": {
          "naming_convention": "graphql-default"
        }
      }
    ]
  }
}

To set the default naming convention globally,
use the environment variable HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION. Note
that the global default can be overridden by the source customisation setting mentioned above.

Note: Custom field names and custom table names will override the naming convention
(i.e. if the custom table name is my_table and naming_convention
is graphql-default, the field names generated will be my_table, my_tableByPk,
my_tableAggregate and so on).

Behaviour Changes

  • cli: change the ordering used for object fields in metadata files to alphabetical order

    Example:

    Server Metadata (JSON) Old behaviour (YAML) New Behaviour (YAML)
    {
      "function": {
        "schema": "public",
        "name": "search_albums"
      }
    }
           
    function:
      schema: public
      name: search_albums
          
    function:
      name: search_albums
      schema: public
          

Bug fixes and improvements

  • server: fix create event trigger failure for MSSQL sources on a table with a table name that is a reserved MSSQL keyword.
  • server: errors from /healthz endpoint are now logged with more details
  • server: do not expand environment variable references in logs or API responses from remote schemas, actions and event triggers for security reasons
  • server: introduce backend_only permissions for update and delete mutations (fix #5275)
  • server: add support for scalar array response type in actions
  • server: add support for table computed fields in bigquery backends
  • server: fix failure when executing consecutive delete mutations on mssql (#8462)
  • server: bugfix: insertion of multiple empty objects should result in multiple entries (#8475)
  • server: allow schemas prefixed with pg, but not pg_ (fix #8435)
  • console: add support for application/x-www-form-urlencoded in rest connectors (#8097)
  • server: restore the ability to do no-op upserts (#8260)

v2.8.0-beta.1

08 Jun 12:06

Choose a tag to compare

v2.8.0-beta.1 Pre-release
Pre-release

Changelog

Disabling query/subscription root fields

(closes #696)

When a table is tracked in graphql-engine, three root fields are generated automatically
namely <table>, <table>_by_pk and <table>_aggregate in the query and the subscription
root. You can now control which root fields are exposed for a given role by specifying them in the select permission.

The main use-case for this feature is to disable APIs that access the table directly but which still need to be tracked so that:

  1. It can be accessed via a relationship to another table
  2. It can be used in select permissions for another table via a relationship

For such use-cases, we can disable all the root fields of the given table. This can be done by setting the select permission as follows:

{
   "role": "user",
   "permission": {
     "columns": [
       "id",
       "name"
     ],
     "filter": {},
     "allow_aggregations": true,
     "query_root_fields": [],
     "subscription_root_fields": []
   }
 }

Another use-case is to allow a role to directly access a table only
through its primary key value. This can be done by setting the select permission as follows:

{
   "role": "user",
   "permission": {
     "columns": [
       "id",
       "name"
     ],
     "filter": {},
     "allow_aggregations": false,
     "query_root_fields": ["select_by_pk"],
     "subscription_root_fields": ["select_by_pk"]
   }
 }

Note that console support for this permission will be released later.

Introducing naming conventions (experimental)

(closes #3320)

Now, users can specify the naming convention of the auto-generated names in HGE. Read docs here.
This is an experimental feature (enabled by setting HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: naming_convention)
and is supported for Postgres databases only for now. There are two naming conventions possible:

Naming Convention Field names Type names Arguments Enum values
hasura-default Snake case Snake case Snake case as defined
graphql-default Camel case Pascal case Camel case Uppercased

Suppose there is a table called my_table and it has columns id, date_of_birth, last_seen, then with
graphql-default naming convention we will get the following auto-generated API:

query {
  myTable(orderBy: {dateOfBirth: asc}, limit: 10) {
    id
    dateOfBirth
    lastSeen
  }
}

To configure the naming convention for a source, set the naming convention in source
customisation while adding the source:

{
  "resource_version": 2,
  "metadata": {
    "version": 1,
    "sources": [
      {
        "name": "default",
        "kind": "postgres",
        "tables": [],
        "configuration": {},
        "customization": {
          "naming_convention": "graphql-default"
        }
      }
    ]
  }
}

To set the default naming convention globally,
use the environment variable HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION. Note
that the global default can be overridden by the source customisation setting mentioned above.

Note: Custom field names and custom table names will override the naming convention
(i.e. if the custom table name is my_table and naming_convention
is graphql-default, the field names generated will be my_table, my_tableByPk,
my_tableAggregate and so on).

Bug fixes and improvements

  • server: errors from /healthz endpoint are now logged with more details
  • server: do not expand environment variable references in logs or API responses from remote schemas, actions and event triggers for security reasons.
  • server: introduce backend_only permissions for update and delete mutations (#5275)
  • server: add support for scalar array response type in actions
  • server: add support for table computed fields in BigQuery backends
  • server: fix failure when executing consecutive delete mutations on MS SQL Server (#8462)
  • server: bugfix: insertion of multiple empty objects should result in multiple entries (#8475)
  • server: restore the ability to do no-op upserts (#8260)
  • console: add support for application/x-www-form-urlencoded in rest connectors (#8097)