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
{{ message }}
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
Hello, I've been working on a new app, and spent quite a bit of time trying to figure out a good way to resolve this issue, but was unable to. Our team is pretty new to GraphQL and Graphback, so I might have missed something obvious here. We've got a few many-to-many relationships in our DB that use through tables, and we've noticed that as it stands, that implementation is leaking into the FE clients in a way that's making it hard to read/update/manipulate those relationships:
We've built the schema in this way based on the recommendation here, but in the generated CRUD API, this through table is actually exposed, so queries are required to look like:
Additionally, creating a new relationship seems to require a custom mutation unless we want to expose the creation of that through-table row to the frontend.
I'm wondering if exposing the implementation of a many-to-many relationship like this to clients is expected, as I certainly didn't expect it, and whether there's a way to collapse that relationship by default when generating the schema/CRUD API.
The text was updated successfully, but these errors were encountered:
Hello, I've been working on a new app, and spent quite a bit of time trying to figure out a good way to resolve this issue, but was unable to. Our team is pretty new to GraphQL and Graphback, so I might have missed something obvious here. We've got a few many-to-many relationships in our DB that use through tables, and we've noticed that as it stands, that implementation is leaking into the FE clients in a way that's making it hard to read/update/manipulate those relationships:
We've built the schema in this way based on the recommendation here, but in the generated CRUD API, this through table is actually exposed, so queries are required to look like:
Additionally, creating a new relationship seems to require a custom mutation unless we want to expose the creation of that through-table row to the frontend.
I'm wondering if exposing the implementation of a many-to-many relationship like this to clients is expected, as I certainly didn't expect it, and whether there's a way to collapse that relationship by default when generating the schema/CRUD API.
The text was updated successfully, but these errors were encountered: