Skip to Content
Mesh

SQLite

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 @omnigraph/sqlite

How to use?

Then you can import the library in your configuration file, and define your Tuql source;

mesh.config.ts
import { defineConfig } from '@graphql-mesh/compose-cli' import { loadSQLiteSubgraph } from '@omnigraph/sqlite' export const composeConfig = defineConfig({ subgraphs: [ { sourceHandler: loadSQLiteSubgraph('MyDb', { db: 'path/to/database.sqlite' }) } ] })

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

mesh.config.ts
import { defineConfig } from '@graphql-mesh/compose-cli' import { loadSQLiteSubgraph } from '@omnigraph/sqlite' export const composeConfig = defineConfig({ subgraphs: [ { sourceHandler: loadSQLiteSubgraph('MyDb', { infile: 'path/to/db_dump.sql' }) } ] })
Last updated on