MyGit

v2.7.0-beta.1

hasura/graphql-engine

版本发布时间: 2022-05-13 06:02:28

hasura/graphql-engine最新发布版本:v2.42.0-beta.1(2024-08-02 16:07:52)

Changelog

Streaming subscriptions

Streaming subscriptions can be used to subscribe only to the data which has been changed in the query. The streaming is done on the basis of a cursor, which is chosen by the user.

Request payload:

subscription GetUserLatestMessages ($user_id: uuid!) {
  messages_stream (cursor: {initial_value: {id: 0}, ordering: ASC}, batch_size: 1, where: {user_id: {_eq: $user_id}} ) {
    id
    from
    to
  }
}

The above subscription streams the messages of the user corresponding to the user_id in batches of 1 message per batch.

Suppose there are two messages to be streamed, then the server will send two responses as following:

Response 1:

{
  "data": [
    {
      "id": 1,
      "from": 155234,
      "to": 155523
    }
  ]
}

Response 2:

{
  "data": [
    {
      "id": 5,
      "from": 178234,
      "to": 187523
    }
  ]
}

Bug fixes and improvements

相关地址:原始地址 下载(tar) 下载(zip)

1、 cli-hasura-darwin-amd64 75.14MB

2、 cli-hasura-darwin-arm64 75.19MB

3、 cli-hasura-linux-amd64 23.45MB

4、 cli-hasura-linux-arm64 22.02MB

5、 cli-hasura-windows-amd64.exe 69.01MB

查看:2022-05-13发行的版本