Skip to content

Releases: hasura/ndc-http

v0.8.1

30 Dec 07:13
50fc4dd
Compare
Choose a tag to compare

What's Changed

  • fix: incorrectly selecting nested fields from distributed responses by @hgiasac in #51
  • feat: prepend base server URL to the relative OAuth2 token path by @hgiasac in #52
  • fix: allow object and array without type name by @hgiasac in #53
  • chore: improve code lints by @hgiasac in #54

Full Changelog: v0.8.0...v0.8.1

v0.8.0

27 Dec 07:12
c887e44
Compare
Choose a tag to compare

Behavior Changes

  • Separate input and result types for shared types: that improves the consistency of shared reference schemas. If you use argument presets for the request body it won't overwrite the response type schema.
  • Change generated names for anonymous enum. The old naming logic isn't concise.
  • Separate oneOf request body into multiple operations that only take effect in the root field. It's type-safer than merging all fields into a union type.

What's Changed

  • cli: improve OpenAPI union types conversion by @hgiasac in #46
  • feat: support compression by @hgiasac in #47
  • feat: support array selectors for preset arguments by @hgiasac in #48
  • feat: Improve unknown content type parser and separate oneOf body to multiple operations by @hgiasac in #49
  • connector-definition: add dummy upgradeConfiguration command for connector upgrade by @hgiasac in #50

Full Changelog: v0.7.0...v0.8.0

v0.7.0

16 Dec 07:44
b152004
Compare
Choose a tag to compare

Highlights

The connector can be used as an HTTP proxy. You can send schemaless HTTP requests through the sendHttpRequest operation. The operation supports timeout and retry options.

mutation SendRawRequest($additionalHeaders: JSON) {
  sendHttpRequest(
    body: { id: 101, title: "Hello world", userId: 10, body: "A test post" }
    method: "post"
    url: "https://jsonplaceholder.typicode.com/posts"
    additionalHeaders: $additionalHeaders
  )
}

# Variables
# {
#   "additionalHeaders": {
#       "X-Test-Header": "bar"
#     }
# }

# Response
# {
#   "data": {
#     "sendHttpRequest": {
#       "body": "A test post",
#       "id": 101,
#       "title": "Hello world",
#       "userId": 10
#     }
#   }
# }

The request body is encoded with application/json content type by default. If you add the Content-Type header in the additionalHeaders argument the connector will try to convert the request body object to the corresponding format.

What's Changed

  • Fix missing scalar type alias from primitive scalars. (#43)
  • Add the Accept request header with the value from the response content type. (#43)
  • Decode the response in JSON/XML format if the content type contains +json or +xml suffix. (#43)
  • Mask sensitive headers that are forwarded from the v3-engine. (#43)
  • Fix incorrectly encoding Arbitrary JSON scalar for application/x-www-form-urlencoded content type. (#44)
  • Fix argument preset initialization in server settings. (#44)
  • Disable HTML escape when encoding JSON. (#44)
  • Reroute HTTP 4xx response from the remote request to HTTP 422 so the detail can appear in the graphql error. (#44)
  • feat: add sendHttpRequest mutation to send schemaless HTTP requests by @hgiasac in #45

Full Changelog: v0.6.1...v0.7.0

v0.6.1

12 Dec 02:00
849466c
Compare
Choose a tag to compare

What's Changed

  • fix: null mTLS certificate causes panic by @hgiasac in #42

Full Changelog: v0.6.0...v0.6.1

v0.6.0

10 Dec 07:53
588255c
Compare
Choose a tag to compare

Highlight

Support argument presets to inject values into request arguments. Preset arguments can be configured globally in the root settings field or on individual servers.

{
  "settings": {
    "servers": [
      {
        "url": {
          "env": "PET_STORE_URL"
        },
        "argumentPresets": [
          {
            "path": "body.name",
            "value": {
              "type": "env",
              "name": "PET_NAME"
            },
            "targets": ["addPet"]
          }
        ]
      }
    ],
    "argumentPresets": [
      {
        "path": "status",
        "value": {
          "type": "forwardHeader",
          "name": "X-Pet-Status"
        },
        "targets": ["findPetsByStatus"]
      },
      {
        "path": "body.id",
        "value": {
          "type": "literal",
          "value": 1
        },
        "targets": ["addPet"]
      }
    ]
  }
}

Support 3 value types:

  • Literal value
  • Environment variable
  • Header forwarding

What's Changed

  • enhancement: evaluate and convert response types by @hgiasac in #37
  • misc: restructure content type encoder modules by @hgiasac in #38
  • feat: argument presets by @hgiasac in #39
  • fix: duplicated input files and improve validation by @hgiasac in #40

Full Changelog: v0.5.0...v0.6.0

v0.5.0

02 Dec 06:41
2280487
Compare
Choose a tag to compare

What's Changed

  • Support OAuth 2.0 client credentials flow by @hgiasac in #33
  • feat: support mTLS authentication by @hgiasac in #34
  • improve CLI configuration troubleshooting after updated by @hgiasac in #35

Full Changelog: v0.4.0...v0.5.0

v0.4.0

27 Nov 06:03
95bf571
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.3.0...v0.4.0

v0.3.0

11 Nov 03:41
82013dc
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.4...v0.3.0

v0.2.4

02 Sep 08:51
a8f8066
Compare
Choose a tag to compare

What's Changed

  • Support application/x-ndjson response content type by @hgiasac in #19
  • upgrade ndc-sdk-go v1.3.0 by @hgiasac in #20

Full Changelog: v0.2.3...v0.2.4

v0.2.3

07 Aug 17:26
5f20768
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.2.2...v0.2.3