Skip to content

Releases: hasura/ndc-http

v0.2.0

08 Jun 17:35
8b4d6ee
Compare
Choose a tag to compare

Highlights

Distributed execution

Imagine that your backend have many server replications, or multiple applications with different credentials. You want to:

  • Specify the server where the request will be executed to.
  • Execute an operation to all servers.

For example, with below server settings, the connector will replicate existing operations with Distributed suffixes:

settings:
  servers:
    - id: dog
      url: "http://localhost:3000"
      securitySchemes:
        api_key:
          type: apiKey
          value: "dog-secret"
          in: header
          name: api_key
    - id: cat
      url: "http://localhost:3001"
      securitySchemes:
        api_key:
          type: apiKey
          value: "cat-secret"
          in: header
          name: api_key
{
  "functions": [
    {
      "arguments": {
        "restOptions": {
          "type": {
            "type": "nullable",
            "underlying_type": {
              "name": "RestSingleOptions",
              "type": "named"
            }
          }
        }
      },
      "name": "findPets",
      "result_type": {
        "element_type": {
          "name": "Pet",
          "type": "named"
        },
        "type": "array"
      }
    },
    {
      "arguments": {
        "restOptions": {
          "type": {
            "type": "nullable",
            "underlying_type": {
              "name": "RestDistributedOptions",
              "type": "named"
            }
          }
        }
      },
      "name": "findPetsDistributed",
      "result_type": {
        "name": "FindPetsDistributedResult",
        "type": "named"
      }
    }
  ]
}

RestSingleOptions object type is added to existing operations (findPets). API consumers can specify the server to be executed. If you want to execute all remote servers in sequence or parallel, findPetsDistributed function should be used.

Config schema changes

Reuse the config schema of ndc-rest-schema. There is a breaking change in the field name path -> file .

What's Changed

Full Changelog: v0.1.3...v0.2.0

v0.1.3

11 May 17:13
dd4d340
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.2...v0.1.3

v0.1.2

17 Apr 05:05
10b0ccc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.1.1...v0.1.2

v0.1.1

15 Apr 04:20
c53875e
Compare
Choose a tag to compare

What's Changed

  • Support timeout and retry settings by @hgiasac in #8

Full Changelog: v0.1.0...v0.1.1

v0.1.0

14 Apr 02:45
cc73098
Compare
Choose a tag to compare

What's Changed

  • Support env template and basic authentication by @hgiasac in #1
  • support server url env template and enum by @hgiasac in #2
  • Update more scalars and request by @hgiasac in #4

New Contributors

Full Changelog: https://github.com/hasura/ndc-rest/commits/v0.1.0