Found read action while expecting an action of type relationship...
Hi, I need to customise a relation get the following error when trying to implement something like
relationship(:events, :events_by_extid)
:
** (ArgumentError) Found an action of type read while looking for an action of type relationship
The message itself is pretty obvious, but I can’t find a definition of how a relationship
action would look like… 😇13 Replies
🤔 I'm not sure I understand
what is
relationship/2
?Oh, sorry: Here’s the bigger picture:
PS: I’m using the main branch of ash_json_api as I needed a current fix from you
Hm…that’s definitely a bug
There is no relationship action type
is there a stacktrace?
Oh, that explains it
Yes, here you go:
okay, I pushed a surface level fix for that
Huh, so fast?!
you might have more problems 😆
"Problem" is my middle name! 😄
So I don't think you should need
events_by_extid
Proably just whatever the primary read is on the events resource
ah, actually
its just the read action to use in this resource, sorry
and that read action will have an appropritate filter on itYes, exactly. And I can confirm that it continues, now! 🎉
its equivalent to
Perfect! As always: Big kudos to you. Ash is amazing! 👏
🥳 thanks! Glad we got it working.