Deploy a Data Connector
Deploy a connector to Hasura DDN
You can deploy any verified connector available on the Connector Hub to Hasura DDN using the CLI.
Step 1: Initialize a new connector
To initialize a new connector, run the following in a project directory:
ddn connector init <connector-name> --subgraph <subgraph-name> --hub-connector <connector> --supergraph <supergraph.cloud.yaml>
Argument | Description |
---|---|
<connector-name> | Whatever name you would like to assign to this connector. |
<subgraph-name> | The name of the subgraph to which the connector belongs. |
<connector> | The connector from the Connector Hub. |
<supergraph.cloud.yaml> | Path to the relevant supergraph config file |
You'll then need to add the connection URI for your connector's data source in the .env
file of the connector:
For example:
CONNECTION_URI=<CONNECTION_URI>
Some connectors don't require any connection URIs
An example of this would be the Node.js Lambda TypeScript connector.
Step 2: Build and deploy the connector
You can then build and deploy your connector to Hasura DDN using the following command with the appropriate values from the previous step:
ddn connector build create --connector <connector.yaml> --project <project-name>
Argument | Description |
---|---|
<connector.yaml> | Path to connector config file. |
<project> | DDN project to deploy to |