-
Notifications
You must be signed in to change notification settings - Fork 227
Support for associationproxy #136
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
Seconding this, an initial google search came up dry and I'm wondering how to access related models via the association proxy. |
This is important to me as well. Feels like a core feature that should be present. |
Does anyone have a workaround for accessing AssociationProxy fields? Edit: I gave AssociationProxy models their own nodes and linked the associated objects via one to one relationships. |
Myself got at least part of it to work. I have Playlists and Media models, both many-to-many in both directions (one playlist can have many media, one media can be part of many playlists)
These two models are tied together via the association_proxy and
More details here, my implementation allows to have multiple "media" in one playlists. On the Graph side
That's the Node for my Playlists model. Notice
Accessing that query from frontend with
With all that I am able to query media associated to this playlist. It would be nice to do the same the other way around but I can't add the PlaylistNode as a graphene.List to my MediaNode because scope logic:
|
ghost I just understood what you suggested there. I can create as many nodes as I need from my Media and Playlist models. I can define and use them anywhere I need, and that's what I did and now I have a working Graph for my bidirectional many-to-many association-proxy relationship :D |
#267 should solve this issue and will be merged soon! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue. |
Hi,
I'm using graphene-sqlalchemy 2.0.0. I haven't found any documentation around association proxy support and my preliminary efforts into finding it in the code/docs/issues have proved futile. Are association proxies supported? If not, is there a plan to support them?
Thanks!
The text was updated successfully, but these errors were encountered: