On this page

SQLite / Tuql

GraphQL Mesh v0 documentation (superseded by v1): Use GraphQL schema created by Tuql for SQLite databases or SQL dump files with GraphQL Mesh Tuql handler. Install `@graphql-mesh/tuql` and get started!

image

This handler allows you to use GraphQL schema created by Tuql, based on an SQLite database schema or an SQL dump file.

To get started, install the handler library:

npm i @graphql-mesh/tuql

Now, you can use it directly in your Mesh config file:

.meshrc.yaml
sources:
  - name: MyDb
    handler:
      tuql:
        db: path/to/database.sqlite

And also you can create an in-memory database using an SQL dump file;

.meshrc.yaml
sources:
  - name: MyDb
    handler:
      tuql:
        infile: path/to/db_dump.sql

CodeSandBox Example

You can check out our example that uses Tuql Handler.

Config API Reference

  • db (type: String) - Pointer to your SQLite database
  • infile (type: String) - Path to the SQL Dump file if you want to build a in-memory database