Converts Mongoose document to JSON result
/!\ The _id is still an ObjectId, but you should not care
NOTE: technically this would work for any kind of collection that return Ids with "toString" method, that's why it belongs to the generic "CRUD" package
Connectors are expected to use string ids It was the default behaviour in Meteor for Mongo, but Mongoose/raw Mongo default behaviour is to use ObjectId
Also needed in default resolvers when calling a data source
=> we prefer string ids in Vulcan for a consistent representation, in particular between the GraphQL client (that will always use string ids) and the server
Create a new object
Will run permissions check, and callbacks tied to a model
The slug passed in the 2nd param, but may be
Throws if some data are invalid
Generated using TypeDoc
Converts Mongo ObjectId to string
NOTE: technically this would work for any kind of collection that return Ids with "toString" method, that's why it belongs to the generic "CRUD" package
Connectors are expected to use string ids It was the default behaviour in Meteor for Mongo, but Mongoose/raw Mongo default behaviour is to use ObjectId
Also needed in default resolvers when calling a data source
=> we prefer string ids in Vulcan for a consistent representation, in particular between the GraphQL client (that will always use string ids) and the server
Do not convert _id in connector, but instead prefer a graphql scalar server-side