apollo-datasource-mongodb icon indicating copy to clipboard operation
apollo-datasource-mongodb copied to clipboard

Apollo data source for MongoDB

Results 35 apollo-datasource-mongodb issues
Sort by recently updated
recently updated
newest added

Hello everybody this is my first time using this library and I'm wondering if there's a way to define the return type of the `collection` object instead of it returning...

bug
help wanted

Speed up proposal for method `findManyByIds`. https://github.com/GraphQLGuide/apollo-datasource-mongodb/blob/08e1c076739867a9e73a707adc66767a7e8525d7/src/cache.js#L173 As-Is right now, it's opening a lot of `findOneById` with a promise.all, but it's really inefficient once you have over 100 keys and...

help wanted
needs reproduction

When the DataLoader runs the mongodb query it should allow the user to specify some options like `projection` as you don't need to cache/fetch fields that you don't use in...

enhancement
help wanted

I am encountering the following error when attempting to follow the documentation ``` Argument of type 'Collection' is not assignable to parameter of type 'Collection'. Types of property 'aggregate' are...

help wanted

I have a typescript error when I try to implement an initialize method in my dataSource ![image](https://user-images.githubusercontent.com/12398583/133291370-c1853729-2d7b-46f6-bb57-8a2ed0d72973.png) So either the doc is wrong or the type for this method is...

enhancement

According to current Mongoose's documentation, interfaces should not extend document: https://mongoosejs.com/docs/typescript.html#using-extends-document However type guards in the library require this. https://github.com/GraphQLGuide/apollo-datasource-mongodb/blob/4e1124d1ebb9665ae1dfeb80a92cf8eb9a5db3b7/index.d.ts#L14 Would you consider relaxing the type guards so that interfaces...

enhancement

Currently if a request triggers N `findOneById(123)` calls (all with the same id), and the cache is empty, there will be N calls to `cache.set(123, doc)`. It would be nice...

enhancement

There doesn't seem to be a way to ensure that `findOneById` gets its value directly from the database. If TTL is unset, then the read will not populate the cache...

enhancement

We could combine queries with an `$or` like in @pcorey's article: http://www.petecorey.com/blog/2017/08/21/advanced-mongodb-query-batching-with-dataloader-and-sift/ How useful is that? We'd have fewer network requests to the server, but I imagine the bulk of...

question

## What to use as the cache key? SQLDataSource uses the SQL query string: https://github.com/cvburgess/SQLDataSource/blob/master/SQLCache.js#L19 Don't know if there's an equivalent for MongoDB. Cachegoose (caching for Mongoose) uses a hash...

enhancement
help wanted