datasource-sql

JSON →
library 2.1.0 ·javascript
verified Jun 5, 2026

SQL DataSource for Apollo GraphQL projects (v2.1.0, released 2022-04-25). Combines Knex.js query builder with Apollo DataSources, providing caching, context, and declarative SQL queries. Ships TypeScript types. Requires peer dependencies graphql >=14.0.2 and knex >=0.95.0. Differentiates from raw Knex by integrating with Apollo's caching and request lifecycle, and from RESTDataSource by offering SQL-specific features like .cache() on queries. Active development with infrequent releases.