Skip to content

Releases: hasura/ndc-http

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

v0.2.2

06 Aug 15:33
3147cdf
Compare
Choose a tag to compare

What's Changed

  • inject trace headers to incoming requests and improve distributed docs by @hgiasac in #15
  • upgrade dependencies by @hgiasac in #16

Full Changelog: v0.2.1...v0.2.2

v0.2.1

10 Jun 17:52
6c9a562
Compare
Choose a tag to compare

What's Changed

  • Upgrade ndc-rest-schema v0.2.1 by @hgiasac in #12
  • Deprecate the convert command. You should install and use ndc-rest-schema binary directly.
  • misc: change default config directory to /etc/connector by @hgiasac in #13
  • fix: avoid modifying mutable request endpoints by @hgiasac in #14

Full Changelog: v0.2.0...v0.2.1