GraphQL ObjectId Scalar Type for MongoDB

JSON →
library 1.0.0 ·javascript
verified Jun 5, 2026

A GraphQL scalar type that serializes, parses, and validates MongoDB ObjectId values. Version 1.0.0 is current. This package provides a simple way to use ObjectId in GraphQL schemas, supporting both default and named imports (ESM and CJS). It ships TypeScript types and has peer dependencies on graphql 16.x and mongodb 4.x. Key differentiator: minimal, focused; no extra configuration needed.