graphql-compose-mongoose

JSON →
library 10.1.0 ·javascript
verified Jun 7, 2026

Plugin for graphql-compose that derives GraphQL types from Mongoose models, generating CRUD resolvers, connection types, and filtering/sorting helpers. Current stable version is 10.1.0, maintained actively with TypeScript support. Requires Node >=20, peer dependencies on graphql-compose ^7.21.4 || ^8.0.0 || ^9.0.0 and Mongoose ^6.0.0 - ^9.0.0. Differentiates from manual type definitions by auto-syncing Mongoose schemas (including indexes, virtuals, discriminators) to GraphQL, and providing a rich set of resolvers like findMany, createOne, removeById, pagination, and dataLoader. Supports query operators ($lt, $gt, etc.) and relational mappings via graphql-compose's schema stitching. Breaking changes in v9.0.0 removed deprecated resolver fields and updated resolver options naming conventions.