You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was interested in using the library because i found it very handy in terms of translating Mongoose Schemas to GraphQLObjects. I was blown away by how good it works but i noticed something. In models that we use Typescript interfaces it complains if I do not use the Extends Documents in the interface.
Is there any reason why we should use the extends Document when the mongoose Documentation recommends against that?
Argument of type 'ReturnModelType<typeof User, BeAnObject>' is not assignable to parameter of type 'Model<Document<any, any, any>, {}, {}, {}, Document<unknown, {}, Document<any, any, any>> & Document<any, any, any> & { _id: ObjectId; }, any>'.
I was interested in using the library because i found it very handy in terms of translating Mongoose Schemas to GraphQLObjects. I was blown away by how good it works but i noticed something. In models that we use Typescript interfaces it complains if I do not use the Extends Documents in the interface.
Is there any reason why we should use the extends Document when the mongoose Documentation recommends against that?
https://mongoosejs.com/docs/typescript.html
The text was updated successfully, but these errors were encountered: