-
Notifications
You must be signed in to change notification settings - Fork 37
dynamic type #54
New issue
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
Comments
Hi, Dynamic relationships are not currently possible. But I don't see any particular problems of implementing it. |
@danivek thanks. I'll submit a PR for this as soon as I get some time. Cheers |
@danivek oh wow, just saw that you had submitted a PR for this. Thanks! |
@jamesdixon 😉. Can you give it a try and give me a feedback ? Thanks |
Will do!
…On Apr 24, 2018, 3:53 PM -0600, Kévin Danielo ***@***.***>, wrote:
@jamesdixon 😉. Can you give it a try and give me a feedback ? Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@danivek sorry for the delay on testing this! Is it possible to allow the function access to the entire record? Unfortunately, the For example, my Thanks! |
@danivek wanted to see if you had any thoughts on the above? Thank you! |
@jamesdixon you’re right ! I will change this to allow the entire record to be passed to the type resolver function. Thank you for your feedback ! |
Thanks, @danivek! Much appreciated 👍 |
Now the type resolver function has 2 arguments Thanks @jamesdixon |
works beautifully! thx @danivek |
Hi there,
I can see that it's possible to change the type dynamically by passing in a configuration to the serializer itself. Is this possible with relationships?
My use case is that I have a
campaign
model that has a relationshiprecipients
. Theserecipients
can be of typestaff
orcustomer
.Is this possible with the current implementation?
Thanks!
The text was updated successfully, but these errors were encountered: