OpenAPI Lambda Connector
The OpenAPI Lambda Connector allows you to import APIs that are documented in the OpenAPI/Swagger format into the Hasura Supergraph. The connector exposes REST API endpoints as Typescript functions, which can be exposed as GraphQL queries or mutations via the NodeJS Lambda Connector.
Functions that wrap GET requests are marked with a @readonly
annotation, and are exposed as GraphQL Queries by the
NodeJS Lambda Connector. All other request types are exposed as GraphQL
Mutations.
This Connector implements the Data Connector Spec
- See the listing in the Hasura Hub
- Hasura DDN Documentation
- Hasura DDN Quickstart
- NodeJS Lambda Connector
Docs for the OpenAPI data connector:
Features
- Convert Open API/swagger documentation into Typescript functions compatible with NodeJS Lambda Connector
- Supported request types
Request Type | Query | Path | Body | Headers |
---|---|---|---|---|
GET | ✅ | ✅ | NA | ✅ |
POST | ✅ | ✅ | ✅ | ✅ |
DELETE | ✅ | ✅ | ✅ | ✅ |
PUT | ✅ | ✅ | ✅ | ✅ |
PATCH | ✅ | ✅ | ✅ | ✅ |
Prerequisites
- Create a Hasura Cloud account
- Please ensure you have the DDN CLI and Docker installed
- Create a supergraph
- Create a subgraph
The steps below explain how to initialize and configure a connector on your local machine (typically for development purposes).You can learn how to deploy a connector to Hasura DDN — after it's been configured — here.
Using the OpenAPI Lambda connector
Check out the Hasura docs here to get started with the OpenAPI Lambda connector.
Saving User Changes
Please refer to Saving User Changes.
Known Limitations
- Support for Relaxed Types is a WiP.
- Types not supported by the NodeJS Lambda Connector are not supported.
Contributing
Check out our contributing guide for more details.
Changelog
Please refer to the changelog.
License
The Open API Lambda Connector is available under the Apache License 2.0.