v1
Source Handlers
MongoDB (soon)

MongoDB (Coming soon)

This handler allows you to use the GraphQL schema created by graphql-compose-mongoose.

To get started, install the handler library:

npm install @omnigraph/mongoose

Then, you can use it in your Mesh configuration:

mesh.config.ts
import { defineConfig } from '@graphql-mesh/compose-cli'
import loadMongooseSubgraph from '@omnigraph/mongoose'
import { User } from './models.ts'
 
export const composeConfig = defineConfig({
  subgraphs: [
    {
      sourceHandler: loadMongooseSubgraph('MyMongooseApi', {
        connectionString: 'mongodb://localhost:27017/test',
        models: {
          // You can provide your models here
          User
        }
      })
    }
  ]
})