A Gatsby source plugin that pulls data from a SQLite database file into Gatsby's GraphQL layer. Version 1.0.0 stable. It supports multiple queries, joins (one-to-one, one-to-many), and remote image downloading for processing with gatsby-plugin-sharp. The plugin requires gatsby >2.0.0 and gatsby-source-filesystem >2.0.0 as peer dependencies. It is a fork of gatsby-source-mysql, modified to use SQLite. Key differentiators: simple configuration, direct SQL queries, and built-in relationship mapping.
npm install gatsby-source-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up gatsby-source-sqlite in Gatsby config to query a SQLite database file and make data available via GraphQL.
Install both: npm install gatsby gatsby-source-filesystem
Ensure the specified column has unique values (e.g., primary key).
Restructure your queries to avoid many-to-many, or raise an issue on GitHub.
Install gatsby-source-filesystem and add it to plugins array in gatsby-config.js.
Run: npm install sql.js
Add a valid SQL SELECT statement to each query object.