/ndc-learn

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Let's Build a Connector!

This repository contains a series of video tutorials which walk through the process of creating a data connector in small steps. We will build a connector to sqlite which you can run locally on your machine, either by cloning this repo, or by following along with each video.

It is recommended that you first review the Hasura NDC Specification and accompanying reference implementation, at least to gain a basic familiarity with the concepts, but these materials are intended to be complementary.

The dependencies required to follow along here are minimal - you will need Node and 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 your PATH. ndc-test can be installed using the Rust toolchain from the ndc-spec repository.

Note: if you would like to follow along with the demos, and deploy this connector to Hasura DDN, you will need to fill out the DDN Access Form in order to request access to the DDN limited alpha.

Video Tutorials

Note: in case your browser does not support the GitHub embedded videos in the following links, video files are provided in the same directories, for viewing locally.

  1. Setup [9:31]
  2. Predicates [6:51]
  3. Sorting [4:34]
  4. Aggregates [4:59]

Other Resources

Getting Started

npm i
npm run build

Run the connector:

node dist/index.js serve --configuration configuration.json

To start from scratch and create the initial project:

npx tsc --init
npm i @hasura/ndc-sdk-typescript sqlite sqlite3