Replies: 1 comment
-
Does |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to call a function that expects a
User
type, but I need it to work with dynamically populated fields. Here’s my setup:User Schema:
Profile Schema:
I have a function that expects a
User
type:When I call this function from another method where I populate the
Profile
, I run into a type issue:Question:
Is there a way to make the
getName
function accept dynamically populated fields without forcing type casting? How can I ensure theUser
type is compatible with populated fields likeprofile
?Beta Was this translation helpful? Give feedback.
All reactions