Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 410 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 410 Bytes

@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 })
}