apollo-datasource-mongodb
apollo-datasource-mongodb copied to clipboard
Apollo data source for MongoDB
I have the following collation on my collection: ```typescript schemaOptions: { collection: 'users', collation: { locale: 'en', strength: 2, }, }, ``` It's working correctly when I directly use the...
With hydrated Mongoose documents they aren't serializable. Therefore caching can't be used, as it serializes the documents. See https://github.com/GraphQLGuide/apollo-datasource-mongodb/issues/74 for why this is needed for Mongoose documents.
@lorensr How does this look to you? This is fully backwards compatible. Code expecting mongoose documents to be returned from the `find...` methods will not break. `toObject` is called only...
I am getting this weird typescript error when I put Mongoose Model in constructor. ``` const ListingsDataSource = new Listings(ListingModel) ``` My Listing Model is defined like this: ``` export...
Hello, I get the following error when I specify a TTL on `findOneById`, `findByFields`, etc `Error: Converting circular structure to EJSON:` I'm sure that it is caused by something weird...
Currently deleteFromCacheByFields doesn't follow the same logic as findByFields for the loader key. This leads to incorrect behavior when the cache is supposed to be invalidated from a call to...
Why does the findByFields() and other functions provided by "this" return a union of the `(TData, undefined, and null)[]`? Why not just TData[]? 
For example. ```ts this.findByFields({ tag: new ObjectId('some-tag-id') }) ``` and ```ts this.deleteFromCacheByFields({ tag: new ObjectId('some-tag-id') }) ``` generate different keys, for this case it will generate: ` {"tag":{"$oid":"6151e9b4b005977991064607"}}` and `...