Skip to main content
Version: v2.x

Hasura GraphQL Data Connector SDK

Introduction

The Data Connector SDK serves as a pack of documentation and resources for understanding, building, and testing Data Connector Agent implementations to ensure that they are complete, correct, idiomatic and can be developed rapidly and with confidence. The workflow that the SDK supports out of the box is powered by Docker Compose in order to reduce the number of dependencies required, but each component may be run natively if desired. The SDK is versioned with the Hasura GraphQL Engine.

The SDK including the docker-compose.yaml file can be found here.

For more details on the SDK, check out the SDK repository README.md.

Building a new Data Connector with the SDK

To create a new Data Connector, follow these steps:

  1. Start the container with docker compose up.
  2. Verify that the tests pass.
  3. Review and make changes to the reference connector for your specific database and intended implementation.
  4. Or rebuild as required, depending on your stack.
  5. Rerun the tests with docker compose run tests.
  6. Interact with the Agent via Hasura GraphQL Engine at http://localhost:8080 and view the OpenAPI Schema at http://localhost:8300.

Reference Connector

The reference connector is located under the /reference path within the SDK and serves as a working connector example. It is written in TypeScript and has several key code snippet examples within the reference itself. For more information on the reference connector, check out README in the reference directory.