We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
According to current Mongoose's documentation, interfaces should not extend document:
https://mongoosejs.com/docs/typescript.html#using-extends-document
However type guards in the library require this.
apollo-datasource-mongodb/index.d.ts
Line 14 in 4e1124d
Would you consider relaxing the type guards so that interfaces don't need to extend document?
The text was updated successfully, but these errors were encountered:
Sure, what are the options for relaxing?
Sorry, something went wrong.
I believe you can just remove the type constraint noting that T must extend Document.
export type Model<T, U = MongooseModel<T>>
I'll try tweaking things on my end and see if this works..
Thanks! Lmk how it goes
this
No branches or pull requests
According to current Mongoose's documentation, interfaces should not extend document:
https://mongoosejs.com/docs/typescript.html#using-extends-document
However type guards in the library require this.
apollo-datasource-mongodb/index.d.ts
Line 14 in 4e1124d
Would you consider relaxing the type guards so that interfaces don't need to extend document?
The text was updated successfully, but these errors were encountered: