@carretto/mongodb
TypeScript icon, indicating that this package has built-in type declarations

0.3.2 • Public • Published

@carretto/mongodb

This is the adapter to use carretto with mongodb.

Install

npm i @carretto/mongodb

Usage

const loader = new DataloaderMongoDB(db.collection('Users'))

// resolver.ts


export async function(
  source,
  args,
  context,
  info
) {
  await loader.load({ query: args.query, projection: myFunctionToGetProjection(info), skip: args.skip, limit: args.limit })
}

Readme

Keywords

none

Package Sidebar

Install

npm i @carretto/mongodb

Weekly Downloads

133

Version

0.3.2

License

MIT

Unpacked Size

4.78 kB

Total Files

11

Last publish

Collaborators

  • alemagio