Using Hasura DDN Data Connectors
Introduction
As a Hasura v2 user, you may be interested in the exciting work in which we're engaging around new connectors for the Hasura Data Delivery Network (DDN). You can see a list of all available connectors on the Connector Hub.
If you're not ready to migrate your entire Hasura v2 project to Hasura DDN, you can still integrate one of our new connectors with your existing project. You can do this by creating a new Hasura DDN project, either self-hosted or on Hasura Cloud, and connecting it to your existing v2 project as a Remote Schema. This way, you can seamlessly integrate the auto-generated GraphQL API from your Hasura DDN project into your existing project, thereby allowing you to use the new connector.
Steps
Step 1. Create a new Hasura DDN instance
Start by creating a new Hasura DDN project locally.
When creating a new project, you'll be prompted to select which connector you'd like to include in your project. You can see the full list on the Connector Hub. This connector will connect to your data source, introspect it, and generate the required metadata to create a GraphQL API with Hasura DDN.
Step 2. Deploy your Hasura DDN instance
When you deploy a Hasura DDN instance, you're actually deploying:
- The supergraph (your API).
- Each connector you've configured (as separate HTTP services).
Follow these steps to deploy your project to Hasura DDN.
Once your project is deployed, ensure you've applied a build and copy your project's GraphQL endpoint from the DDN console.
Step 3. Add the instance as a Remote Schema
Follow our quickstart for Remote Schemas here. Again, be sure to use your GraphQL endpoint from the previous step.
To avoid a naming conflict, you should add a typename prefix to your DDN Remote Schema. You can access this setting
under GraphQL Customizations
when adding a Remote Schema in the Console.
Step 4. Test
Finally, make a query to test your Remote Schema and DDN connector in your v2 project.
For example, let's say we namespaced the Remote Schema as DDN
; in that case, we should be able to write the following
query, complete with remote relationships, to return information from our combined schema:
All observability information for this connector, and any queries or mutations associated with it, can be explored using the Hasura DDN console. Click here to learn more about metrics, traces, and other observability features of Hasura DDN.
Recap
With the steps above, you can easily integrate any DDN connector into an existing v2 project, using a Hasura DDN instance, which is either self-hosted or on Hasura Cloud.
If you're curious about the differences between Hasura v2 and Hasura DDN, check out this guide which is designed to help you grok how features you know and love have been improved upon in Hasura DDN!