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

I have the following ApolloServer (v4) ``` import { MongoDataSource } from 'apollo-datasource-mongodb' export default class LoaderAsset extends MongoDataSource { async getAsset(assetId) { return this.findOneById(assetId) // ERROR IS HERE }...

I replaced my UserAPI with the one in apollo-datasources-mongodb typescript section, and still got the same error. ---ERROR--- >Argument of type 'import("C:/Users/969070/Code/pistachio_develpment/server/node_modules/mongodb/mongodb").Collection' is not assignable to parameter of type 'import("C:/Users/969070/Code/pistachio_develpment/server/node_modules/apollo-datasource-mongodb/node_modules/@types/mongodb/index").Collection'....

Hi, when you install apollo-datasource-mongodb, I got the following error warning "apollo-datasource-mongodb > [email protected]" has incorrect peer dependency "graphql@^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0".

bug
help wanted

I am wondering why isn't there a `findOneByFields` method, similar to the existing `findByFields` one. Currently I'm using this hack: ```typescript async findOneByFields(values) { return this.findByFields(values).then((documents) => documents?.[0]) } ```...

I rarely have time for reviewing PRs and making releases—would be happy to find someone interested in taking that on! Let me know if you're interested in helping out: `[email protected]`

So there is a document `{ "top-field": "abc", "nested-fields": { "field1": "value", "field2": "" } }` I'm sending two queries: `const itemsA = this.findByFields({ "nested-fields.field1": "value"}); const itemsB = this.findByFields({...

bug
needs reproduction

Types should not extend Document as per discussion in https://github.com/GraphQLGuide/apollo-datasource-mongodb/issues/88

In `/src/cache`, `dataloader` and `bson` are dependencies, but `mongodb` is not: https://github.com/GraphQLGuide/apollo-datasource-mongodb/blob/08e1c076739867a9e73a707adc66767a7e8525d7/src/cache.js#L1-L3 Current dependencies: https://github.com/GraphQLGuide/apollo-datasource-mongodb/blob/5d8f93a141ba7fdd85c0dbd86e8290380603c667/package.json#L19-L26 That means if you install apollo-datasource-mongodb, then run `npm prune --production`, there's a chance that...

I would like to store the authenticated user in the context, in order for each method of the `DataSource` to directly access it, but I think it may be an...

help wanted
question