mquery is a fluent MongoDB query builder for Node.js, version 6.0.0. It provides a chainable API for constructing and executing MongoDB queries, supporting features like geospatial queries, validation, and custom base queries. It is designed to work with the official MongoDB driver and Mongoose. Compared to raw driver usage, mquery offers a more expressive and easier-to-use interface. Release cadence is irregular; the latest version requires Node >=20.19.0.
npm install mqueryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MongoDB, constructs a query for documents with type 'fruit', sorts by name ascending, limits to 10, and executes.
Upgrade Node.js to >=20.19.0 or use mquery v5.x.
Use import syntax or migrate to CommonJS via dynamic import() if necessary.
Use `.cursor().stream()` instead.
Use `Model.collection` to get the driver collection.
Change to import statement: `import mquery from 'mquery';`
Use `import mquery from 'mquery';` instead of `import { mquery } from 'mquery';`Use the default export `mquery` to create queries, not the Query type.