Intro - Let's Build a Connector!
In this course we will go through the process of creating a Hasura DDN data connector in TypeScript step-by-step.
A data connector in Hasura DDN is an agent which allows you to connect Hasura to any arbitrary data source.
What will we be building?
We will build a basic connector to an SQLite file-system database which you can run locally on your machine.
This will familiarize you with the process of creating a connector to the Hasura DDN specification. You can then take the concepts you've learned and apply it to any data source you'd like to integrate with Hasura DDN.
How do I follow along?
You can watch the walkthrough videos in each section and also follow along with the code in this tutorial by first cloning the repo.
The YouTube playlist for all the videos is here.
What will I learn?
You'll learn the fundamentals of creating a basic data connector with the TypeScript Data Connector SDK. You can then take what you've learned into creating a data connector for any data source.
What do I need to take this tutorial?
It is recommended that you first review the Hasura NDC Specification, at least to gain a basic familiarity with the concepts, but this course is intended to be complementary to the spec.
The dependencies required to follow along here are minimal:
- you will need Node with
npm
so that you can run the TypeScript compiler. - If you'd like to follow along using the same test-driven approach, then you will also need a working
ndc-test
executable on yourPATH
.
ndc-test
can be installed using the Rust toolchain from the ndc-spec
repository.
How long will this tutorial take?
About an hour.
Additional Resources
- The NDC Specification details the specification for data connectors which work with Hasura DDN.
- Reference Implementation with Tutorial
- SDKs for data connectors built with Rust, and the one which we will be using in this course, TypeScript.
- Examples of existing native data connectors built by Hasura.
- Clickhouse (Rust)
- QDrant (Typescript)
- Deno (Typescript)
- Hasura DDN Docs
- Hasura DDN Hub - This is where data connectors are published and can be installed into your Hasura DDN instance.
- Hasura DDN Open Source Engine codebase
- Build apps and APIs 10x faster
- Built-in authorization and caching
- 8x more performant than hand-rolled APIs