In /src/cache, dataloader and bson are dependencies, but mongodb is not:
|
import DataLoader from 'dataloader' |
|
import { ObjectId } from 'mongodb' |
|
import { EJSON } from 'bson' |
Current dependencies:
|
"dependencies": { |
|
"@types/mongodb": "^3.5.27", |
|
"apollo-datasource": "^0.3.1", |
|
"apollo-server-caching": "^0.3.1", |
|
"apollo-server-errors": "^2.4.1", |
|
"bson": "^4.1.0", |
|
"dataloader": "^1.4.0" |
|
}, |
That means if you install apollo-datasource-mongodb, then run npm prune --production, there's a chance that the mongodb package will be pruned and this package will error with:
Error: Cannot find module 'mongodb'