All Connectors
(Turso) SQLite Native Data Connector
(Turso) SQLite Native Data Connector
(Turso) SQLite Native Data Connector
Connect to a SQLite database and expose them to Hasura v3 Project
About
Version
Released
June 20, 2024
Last Updated
November 13, 2024
GitHub Repo
Creator
Hasura
Community Supported

Hasura Turso Connector

Docs ndc-hub License Status

The Hasura Turso Connector allows for connecting to a LibSQL/SQLite database or a Turso hosted LibSQL database to give you an instant GraphQL API on top of your Turso data.

This connector is built using the Typescript Data Connector SDK and implements the Data Connector Spec.

Features

Below, you'll find a matrix of all supported features for the Turso connector:

FeatureSupportedNotes
Native Queries + Logical Models
Simple Object Query
Filter / Search
Simple Aggregation
Sort
Paginate
Table Relationships
Views
Distinct
Remote Relationships
Custom Fields
Mutations

Prerequisites

  1. Create a Hasura Cloud account
  2. Please ensure you have the DDN CLI and Docker installed
  3. Create a supergraph
  4. Create a subgraph

The steps below explain how to initialize and configure a connector on your local machine (typically for development purposes).You can learn how to deploy a connector to Hasura DDN — after it's been configured — here.

Using the Turso connector

With the context set for an existing subgraph, initialize the connector:

ddn connector init -i

When the wizard runs, you'll be prompted to enter the following env vars necessary for your connector to function:

NameDescription
TURSO_URLThe connection string for the Turso database, or the file path to the SQLite file
TURSO_AUTH_TOKENThe turso auth token

If you are attaching to a local SQLite file, first make sure that the file is located inside the connector directory. For example, if you had a data.sqlite file you could place it at /app/connector/turso/data.sqlite. Files in the connector directory get mounted to /etc/connector/.

In this instance, you would set the TURSO_URL=file:/etc/connector/data.sqlite and leave the TURSO_AUTH_TOKEN as blank/null.

Your experience mounting files may vary, and while useful to explore a file locally, it's not recommended to attempt to deploy a connector using a locally mounted file.

After the CLI initializes the connector, you'll need to:

Documentation

View the full documentation for the Turso connector here.

Contributing

Check out our contributing guide for more details.

License

The Turso connector is available under the Apache License 2.0.

2024 Edition

The GraphQL Handbook

A GraphQL Handbook for developers and architects to help plan your GraphQL adoption journey.
The GraphQL Handbook

Ship a rock-solid API on your data – in minutes!