HTTP Connector allows you to quickly convert HTTP APIs to NDC schema and proxy requests from GraphQL Engine v3 to remote services. The connector can automatically transform OpenAPI 2.0 and 3.0 definitions to NDC schema.
- No code. Configuration based.
- Composable API collections.
- Supported many API specifications.
- Supported authentication.
- Supported headers forwarding.
- Supported argument presets.
- Supported response transforms.
- Supported timeout and retry.
- Supported concurrency and sending distributed requests to multiple servers.
- GraphQL-to-REST proxy.
Supported request types
Request Type | Query | Path | Body | Headers |
---|---|---|---|---|
GET | ✅ | ✅ | NA | ✅ |
POST | ✅ | ✅ | ✅ | ✅ |
DELETE | ✅ | ✅ | ✅ | ✅ |
PUT | ✅ | ✅ | ✅ | ✅ |
PATCH | ✅ | ✅ | ✅ | ✅ |
Supported content types
Content Type | Supported |
---|---|
application/json | ✅ |
application/xml | ✅ |
application/x-www-form-urlencoded | ✅ |
multipart/form-data | ✅ |
application/octet-stream | ✅ (*) |
text/* | ✅ |
application/x-ndjson | ✅ |
image/* | ✅ (*) |
*: Upload file content types are converted to base64
encoding.
Supported authentication
Security scheme | Supported | Comment |
---|---|---|
API Key | ✅ | |
Basic Auth | ✅ | |
Bearer Auth | ✅ | |
Cookies | ✅ | Require forwarding the Cookie header from the Hasura engine. |
OAuth 2.0 | ✅ | Built-in support for the client_credentials grant. Other grant types require forwarding access tokens from headers by the Hasura engine |
mTLS | ✅ |
Follow the Quick Start Guide in Hasura DDN docs. At the Connect to data
step, choose the hasura/http
data connector from the dropdown. The connector template includes an example that is ready to run.
- Configuration
- Authentication
- Argument Presets
- Response Transforms
- Schemaless Requests
- Distributed Execution
- Recipes: You can find or request pre-built configuration recipes of popular API services here.
- NDC HTTP schema
HTTP connector is a configuration-based HTTP engine and isn't limited to the OpenAPI specs only. You can use this connector as a GraphQL-to-HTTP proxy service without any OpenAPI documentation required. The connector also built-in support for retry, advanced authentication schemes such as mTLS, and response transformer.
Meanwhile, the OpenAPI Connector generates OpenAPI APIs to TypeScript code. If you want to take more control of OpenAPI or use it as a library, the OpenAPI connector is suitable for your requirements.
Most of web frameworks support plugins or middlewares for OpenAPI generation these days. We recommend you integrate them so you don't need to manually update the docs for future API changes.
Otherwise, if you are using Postman to manage your API documentation, many tools, such as [postman2openapi] (https://kevinswiber.github.io/postman2openapi/), will help you convert Postman collections to OpenAPI documents.
HTTP Connector is available under the Apache License 2.0.