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'm trying to use the isDocument type guard in React code that fetches a Post object via GraphQL. I need only the Post class, and no model capabilities, since I'm not using mongoose on the frontend only on the backend, powering the GraphQL server). Is there a proper way to do this?
I installed @typegoose/typegoose and mongoose in my Gatsby/React project and tried,
even if typegoose was made compatible with the browser, you couldnt use typeguards, because they depend on the data using mongoose model/documents, and in the checks it uses mongoose too - so they will never work in an browser
otherwise this might be an duplicate of #33
-> and as i said in there, im willing to look into prs for this if any get made
I'm trying to use the
isDocument
type guard in React code that fetches aPost
object via GraphQL. I need only thePost
class, and no model capabilities, since I'm not usingmongoose
on the frontend only on the backend, powering the GraphQL server). Is there a proper way to do this?I installed @typegoose/typegoose and mongoose in my Gatsby/React project and tried,
but I get this error:
Versions
The text was updated successfully, but these errors were encountered: