graphql-compose-mongoose
graphql-compose-mongoose copied to clipboard
Mongoose Deprication Warnings
Mongoose (actually mongo driver underlying i think) has depricated many fields in the most recent versions. I believe this package is triggering lots of warnings about this.
Example Warnings
(node:46925) DeprecationWarning: collection.ensureIndex is deprecated. Use createIndexes instead.
(node:46925) DeprecationWarning: collection.update is deprecated. Use updateOne, updateMany, or bulkWrite instead.
(node:46925) DeprecationWarning: collection.remove is deprecated. Use deleteOne, deleteMany, or bulkWrite instead.
(node:46925) DeprecationWarning: collection.count is deprecated, and will be removed in a future version. Use collection.countDocuments or collection.estimatedDocumentCount instead
package.json (excerpt)
"graphql": "^0.13.2",
"graphql-compose": "^4.3.0",
"graphql-compose-mongoose": "^4.1.1",
"graphql-iso-date": "^3.5.0",
"graphql-tools": "^3.0.2",
"graphql-type-json": "^0.2.1",
"mongoose": "^5.2.10",
This warning are still being thrown. Is there a timeline to fix this?
I don't have enough time right now. PR can be quite simple, like this https://github.com/graphql-compose/graphql-compose-mongoose/commit/487884488eeb977b64d880ae4b0e15b547f25d2a#diff-2944c7c61cd747255906ed1c091ea146
I will be very happy if someone makes PR. 😉