Registry / database / node-red-contrib-mongoql

node-red-contrib-mongoql

JSON →
library0.9.7jsnpmunverified

Node-RED node package (v0.9.7) that provides a custom node ('mongoql') for building MongoDB queries within Node-RED flows. Allows users to construct MongoDB query objects via a visual interface or JSON, reducing syntax errors. Low release cadence (last update 2020); suitable for Node-RED users who need to query MongoDB without writing raw queries. Supports MongoDB operators like $regex, $gte, $in. No TypeScript types provided.

npm install node-red-contrib-mongoql
INSTALL
IMPORT
SIG · NODE-RED-CONTRIB-M
N
node-red-contrib-mongoql
databasejavascriptv0.9.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MongoQL node
Install as a Node-RED palette and use the 'mongoql' node in flows.
const MongoQL = require('node-red-contrib-mongoql')
This is a Node-RED node, not a library. Install via Manage Palette or npm, then use the node in the editor.

Shows installation and basic usage in Node-RED environment.

// No programmatic usage; install via Node-RED palette manager. // 1. In Node-RED, go to Manage Palette > Install. // 2. Search 'node-red-contrib-mongoql' and install. // 3. Drag 'mongoql' node onto canvas. // 4. Configure query in the node's edit dialog (e.g., { "field": { "$regex": "pattern" } }). // 5. Wire to a MongoDB output node (e.g., using 'node-red-node-mongodb').
Debug
Known issues
gotchaThe mongoql node outputs a msg.payload containing the MongoDB query object, not the query results. Users often expect it to execute the query.
fix
Connect the mongoql node to a MongoDB node (e.g., node-red-node-mongodb) that executes the query.
affects: *
deprecatedRelies on MongoDB Node.js driver v2.x internally; newer Node-RED and MongoDB drivers may cause compatibility issues.
fix
Check MongoDB driver version and consider alternatives if using modern MongoDB features.
affects: >=0.9.0
gotchaOnly supports a subset of MongoDB operators; complex aggregations or update operations are not available.
fix
For advanced queries, use a full MongoDB client node or custom function node.
affects: *
gotchaDocumentation is sparse; no examples for nested queries or $elemMatch operator.
fix
Refer to MongoDB documentation for query syntax and test in a function node first.
affects: *
Errors
Common errors & fixes
TypeError: Cannot read property 'find' of undefined
MongoQL node output is a query object, not a MongoDB collection. User tries to call .find() on msg.payload.
fix
Ensure the mongoql node is connected to a separate MongoDB output node that receives the query object.
Node not found
Node-RED cannot locate the mongoql node after installation.
fix
Restart Node-RED after installation. If still missing, run 'npm install --save node-red-contrib-mongoql' in the user data directory.
msg.payload is not a plain object
Incorrect configuration syntax in the mongoql node editor; query must be JSON object.
fix
In the mongoql node edit dialog, enter valid JSON (e.g., {"field": "value"}) without enclosing quotes for keys.
Upgrade
Version history
0.9.7latest on npm
Audit
Dependencies
node-redrequiredPeer dependency required to provide Node-RED runtime environment.
Agent activity
2 hits · last 30 days
node
2
Resources
node-red-contrib-mongoql — npm install node-red-contrib-mongoql · libregistry