GraphQL ObjectId Scalar

JSON →
library 1.0.5 ·javascript
verified Jun 5, 2026

graphql-objectid-scalar (v1.0.5) is a lightweight GraphQL.js scalar type for MongoDB ObjectId values. It serializes ObjectId instances from mongodb to strings, parses strings back into ObjectId, and validates ObjectId format. Ships TypeScript types, requires peer dependencies graphql >=0.8.0 and mongodb >=3.0.0. Key differentiator: minimal, tested in CI, designed for use with graphql-tools. Released with low maintenance cadence.