Connector in TypeScript Tutorial
In this course we will go through the process of creating a Hasura DDN data connector in TypeScript step-by-step.
Data connectors allow us to target arbitrary data sources and bring their data into our Hasura graph.
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 them to any data source you'd like to integrate with Hasura DDN.
How do I follow along?
You can follow along with the code in this tutorial by first cloning the repo.
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.
- SDKs for data connectors built with Rust, and the one which we will be using in this course, TypeScript.
- NDC Rust SDK
- NDC Typescript SDK
- 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