Skip to content

v0.7.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 16 Dec 07:44
· 3 commits to main since this release
b152004

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