Closed diogomrts closed 2 months ago
As far as I can tell, this should be working. However, you don't pass the composite id, you'll have to pass the full map. I've added a test to the main
branch in that same test file you were looking in. as an example.
Hello, I've encountered an issue when trying to delete a
DashboardWidget
through a relationship using a composite primary key. I'm not sure if I'm using it incorrectly, but the behavior seems off.I followed an example from the Ash JSON API repository:
Example from
patch_test.exs
These are my two Resources:
In my case, since I have a composite primary key with
dashboard_id
andwidget_id
, I passed "1-042c2d7d-af6d-4edf-a6f1-fc8adce0d6cf" to the request dashboards/1/dashboard_widgets/delete:But there is an error:
So i tried changing the argument to a map containing the two IDs. However, that also did not work.
Additional Context: To avoid this, I considered defining an endpoint in the
DashboardWidget
resource. However, this approach would not provide the full dashboard structure in the response, which is something I need.** Runtime