Skip to main content
Version: 🚧 Canary

🗄️ Mongo Blocks

MongoDB blocks provide core database operations and utility functions for MongoDB collections in Nodeblocks applications. These blocks encapsulate common MongoDB patterns with standardized error handling and data normalization.


🎯 Overview

MongoDB blocks are designed to:

  • Provide database query operations with standardized functions for finding documents
  • Handle errors consistently with custom BlockError classes
  • Normalize data automatically by handling MongoDB-specific fields like _id
  • Ensure type safety with full TypeScript support
  • Enable composition for building complex database operations

📦 Block Types

🔧 Blocks

Pure business logic functions for MongoDB operations:

  • findResources: Retrieve multiple documents with error handling
  • buildWithoutMongoIdFindOptions: Create projection options to exclude _id

View Mongo Blocks →