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
Originally posted by plap979 December 13, 2024
Hi,
before to start, let me thank all the Keystone people. Keystone’s simply great! I dreamed about a tool like this by years... I hope I can help somehow with this bug report.
How to reproduce
I just created a fresh new app with npm create keystone-app@latest and I just added these 2 lists:
Note how truckId is given when the trailer mutates but not the other way around. I like it. It shows us that the hook api is more near to the database than the client side. Even the Hooks API doc itself, telling about item and originalItem, says “This object is an internal database item”, which slightly confirms my thought.
Now mutate the trailer to link it and to unlink to and from the truck. You will read:
and that’s wonderful. Now do the same, but from the truck side, by navigating the Admin UI to the truck, or by the api explorer (with updateTruck mutation)
Discussed in #9432
Originally posted by plap979 December 13, 2024
Hi,
before to start, let me thank all the Keystone people. Keystone’s simply great! I dreamed about a tool like this by years... I hope I can help somehow with this bug report.
How to reproduce
I just created a fresh new app with
npm create keystone-app@latest
and I just added these 2 lists:Basically, they're just 2 entities in a 1-to-1 optional relationship and with the same
afterOperation
list hook. Now:You will read:
Note how
truckId
is given when the trailer mutates but not the other way around. I like it. It shows us that the hook api is more near to the database than the client side. Even the Hooks API doc itself, telling aboutitem
andoriginalItem
, says “This object is an internal database item”, which slightly confirms my thought.Now mutate the trailer to link it and to unlink to and from the truck. You will read:
and that’s wonderful. Now do the same, but from the truck side, by navigating the Admin UI to the truck, or by the api explorer (with
updateTruck
mutation)Unexpected behavior
I found this an unexpected behavior. I expected that Keystone invokes the Trailer hook rather than the Truck hook:
Currently my node.js is v20.18.0 and my package.json contains:
I think this bug could be related to #7301.
Tnx
The text was updated successfully, but these errors were encountered: