
Storage Connector
With this connector, Hasura allows you to instantly create a real-time GraphQL API on top of your cloud storage objects. This connector supports cloud storage functionalities to manage your files on cloud storage, allowing for efficient and scalable data operations.
This connector is built using the Go Data Connector SDK and implements the Data Connector Spec.
Docs for the Storage data connector:
Features
Supported storage services
Service | Supported |
---|---|
AWS S3 | ✅ (*) |
Google Cloud Storage | ✅ |
Azure Blob Storage | ✅ |
MinIO | ✅ (*) |
Cloudflare R2 | ✅ (*) |
DigitalOcean Spaces | ✅ (*) |
(*): Support Amazon S3 Compatible Cloud Storage providers. The connector uses MinIO Go Client SDK behind the scenes.
Supported features
Below, you'll find a matrix of all supported features for the Storage connector:
Feature | Supported | Notes |
---|---|---|
List Buckets | ✅ | |
Create Bucket | ✅ | |
Update Bucket | ✅ | |
Delete Bucket | ✅ | |
List Objects | ✅ | |
Upload Object | ✅ | |
Download Object | ✅ | |
Delete Object | ✅ | |
Generate Presigned-URL | ✅ |
Prerequisites
- Create a Hasura Cloud account
- Please ensure you have the DDN CLI and Docker installed
- Create a supergraph
- Create a subgraph
- Authentication credentials of cloud storage services.
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 Storage connector
With the context set for an existing subgraph, initialize the connector:
ddn connector init -i
When the wizard runs, choose hasura/storage
connector. AWS S3 environment variables are the default settings in the interactive prompt. You'll be prompted to enter the following env vars necessary for your connector to function. If you want to use other storage providers you need to manually configure the configuration.yaml
file and add the required environment variable mappings to the subgraph definition.
After the CLI initializes the connector, you'll need to:
- Introspect the source.
- Add your models, commands, and relationships.
- Create a new build.
- Test it by running your project along with the connector.
License
The Storage connector is available under the Apache License 2.0.