hasura / learn-graphql

Real world GraphQL tutorials for frontend developers with deadlines!
https://hasura.io/learn/
MIT License
1.18k stars 647 forks source link

Hasura DDN Data Connector in TypeScript Course #1019

Closed seanparkross closed 5 months ago

seanparkross commented 5 months ago

Description

A tutorial for building a Hasura DDN data connector in TypeScript.

This tutorial is derived from Phil Freeman's guide and videos here and takes the user through the entire process of creating a Hasura DDN data connector in TypeScript, enabling the connection of Hasura to an SQLite file system database.

TODOS:

Related Issues

NONE

Solution and Design

The tutorial is structured to provide a step-by-step guide, with basic setup to handling queries, and implementing tests.

The tutorial leverages the Hasura NDC Typescript SDK and provides code snippets and explanations at each step, ensuring that the user can follow along and understand the underlying principles and methods.

Steps to test and verify

As normal

Limitations, known bugs & workarounds

The current implementation covers basic querying and does not support advanced features. These should be planned for future sections of this, or other, tutorials.

paf31 commented 5 months ago

Do we think people will get confused by "TypeScript connector", since this is about creating "a TypeScript connector" but has nothing to do with "the Typescript (Node) connector" which will be referred to elsewhere in the docs? I notice the Youtube videos are all titled this way as well.

seanparkross commented 5 months ago

@paf31 Will rename to "Hasura DDN Data Connector in TypeScript Course"

paf31 commented 5 months ago

We can init a project in an Hasura project for them, but I'm unsure how to add custom connector like this to metadata. Help appreciated.

I wanted to do a video about how to set this all up, but never got to it, and it was quickly going to get out of date anyway. I'm not sure how in-scope it is, in the context of a set of test-driven videos using ndc-test anyway. As you say, it's more about showing that it's actually going to run when you finish working through each chapter, but maybe we can achieve that in the video a different way.

configuration.json object There feels like a gap in the course as to how to create this file and how it fits into the whole thing.

This is likely to change soon, because configuration in the SDKs will be changing generally, so it's probably best not to say very much about this right now, and just to deal with it at a high level - config is an SDK concept, not a spec-level concept, so it's up to each connector how to implement it. The SDK does it with a file, and it captures enough of the schema information to make it possible to return the /schema response efficiently. Later it might move elsewhere but we can probably gloss over that here for now.