Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mongodb should be a dependency or peerDependency instead of devDependency #96

Open
@crccheck

Description

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /