agnostic-query v1.10.5 is a Type-safe fluent builder for portable query schemas. It provides a runtime-agnostic, database-agnostic query schema that can be serialized to JSON and transmitted over HTTP. The same schema drives Drizzle, Kysely, db0, or raw SQL, enabling query reuse across client and server. Key differentiators: zero runtime dependencies, tree-shakeable, supports complex logical nesting (and, or, not), tuple field paths for JSONB, and adapter-based architecture (Drizzle, Kysely, raw SQL). Active development with periodic releases on npm.
npm install agnostic-queryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates fluent builder with type-safe methods to create a portable QuerySchema, then outputs JSON.
Use import { toDrizzle } from 'agnostic-query/adapters/drizzle' instead of 'agnostic-query'.Use .where('field', 'is null') — no third argument.Always pass field paths as arrays of strings/numbers.
Only install the peer deps you actually use. Tree-shaking removes unused adapter modules.
Ensure package version >=1.0.0 and import from 'agnostic-query/adapters/drizzle'. If using monorepo, check package exports.
Use array path: ['address', 'city'] instead of 'address.city'.
Import from 'agnostic-query/adapters/drizzle'.
Ensure at least one .where() or .orderBy() is called before .toJSON().