Releases: hasura/ndc-http
v0.8.1
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
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
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
What's Changed
Full Changelog: v0.6.0...v0.6.1
v0.6.0
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
v0.4.0
What's Changed
- feat: CLI plugin by @hgiasac in #27
- fix: the jsonschema ref link by @hgiasac in #28
- feat: rename
ndc-rest
tondc-http
by @hgiasac in #29 - fix: OAS conversion and trim special characters by @hgiasac in #30
- feat: revise the security schema by @hgiasac in #31
- feat: support xml content type by @hgiasac in #32
Full Changelog: v0.3.0...v0.4.0
v0.3.0
v0.2.4
v0.2.3
What's Changed
- feat: apply default headers from settings by @hgiasac in #17
- feat: upgrade ndc-rest-schema v0.2.2 by @hgiasac in #18
Full Changelog: v0.2.2...v0.2.3