Closed salcedo closed 1 year ago
Hey @salcedo ,
What kind of relationship are you trying to create? Can you explain it a bit more?
Hi @bellini666 . Apologies for taking up anyone's time with this. Thank you for your response.
Assuming the standard Post with Comment Django models examples (where Comment model has a ForeignKey to Post and thus a Post can have comments), is there currently support for this with Relay?
And also apologies for the XY, but the problem I'm trying to solve here is getting a total count of records in the database along with the response. With strawberry-django-plus, I can use ListConnectionWithTotalCount, but that appears to only work when using Relay, and I think it works well.
Currently my app works great with all of the nodes and edges WITHOUT relay, but it lacks the ability to return a total count (accounting for any filters applied). Using Relay seems like overkill because our front-end is Vue.js, but I am willing to dirty-hack our front-end to utilize "Relay" simply for access to this much needed totalCount. However, I cannot figure out how to make the types and queries under Relay return consistent edges { node { ... } } structures while nesting down through relationships.
Thus, the tl;dr: When using Relay - We can get a total count. But working with relationships of django models are lacking documentation or examples. When not using Relay - Everything except being able to get a total count works great.
Apologies for taking up anyone's time with this
No need to apologize :)
Thus, the tl;dr: When using Relay - We can get a total count. But working with relationships of django > models are lacking documentation or examples. When not using Relay - Everything except being able to get a total count works great.
Yeah, there's actually a lot of things missing documentation/examples T_T
Regarding totalCount
not working, it has a special handling there. Could you share an example of what you are trying to do so maybe I can spot what might be wrong?
Will continue this in #266
How to handle relationships with Relay implementation?
Upvote & Fund