-
Notifications
You must be signed in to change notification settings - Fork 19
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
Delete by nodeId doesn't work #71
Comments
Hi :) sorry for the late reply. This is indeed a bug; It actually affects more queries. I will Push a fix and add tests for this case. Thank you! |
Reworked `non-id` primary keys to just alias the named primary key of the table instead of using `nodeId` - which would be inconsistent and not work for all cases e.g. `GET_MANY`. Fixes #71 BREAKING CHANGE: This might be a breaking change for some people who relied on `nodeId` semantics.
# [5.0.0](v4.5.0...v5.0.0) (2021-09-12) ### Bug Fixes * non-id primary key handling. ([70c5bbc](70c5bbc)), closes [#71](#71) ### BREAKING CHANGES * This might be a breaking change for some people who relied on `nodeId` semantics.
🎉 This issue has been resolved in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I reworked the non-id primary key logic and removed |
Thanks for the fix! It works fine for non-id primary keys, but unfortunately it doesn't work when primary key consists of 2 columns, like relationship tables. |
Yes, indeed that might be a problem; I will check if I can implement something for this case; Not all features are supported then, but at least fetch one update etc should work. |
🎉 This issue has been resolved in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I have a relation table that doesn't have an
id
column and I'm trying to delete a record bynodeId
with custom mutation. I get the following error:Seems like that
Delete${resourceTypename}Input
doesn't match with the input of${deleteResourceName}
as the latter includes theByNodeId
. Also, the variables object for this mutation (input: { id }
) is incompatible withDeleteByNodeId
which expectsinput { nodeId }
.Code of interest:
ra-postgraphile/src/buildQuery.ts
Lines 243 to 252 in 41e4a29
Is this a bug or is there another way to delete a record when the table doesn't have
id
column? I tried some changes. but I wanted to make sure I'm not doing something wrong before I open a PR.The following changes resolve the issue, but I'm not sure how to test them for other cases.
The text was updated successfully, but these errors were encountered: