-
-
Notifications
You must be signed in to change notification settings - Fork 60
support index queries with generic actions #363
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
support index queries with generic actions #363
Conversation
95eddc4 to
75a7a8b
Compare
75a7a8b to
1d1d6a3
Compare
5d1e1d4 to
b2b7000
Compare
| request | ||
| |> fields(request.resource) | ||
| |> Enum.filter(&(&1 not in Ash.Resource.Info.attribute_names(request.resource))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this was actually why it tried to load when I ran into the problem with the index query. Can we do this, or are there potential side-effects.
If so, there are more places with the same logic that I need to update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 No, this load is also effetcively doing an "ensure selected" on the fields in question. You can do this conditionally if there is no primary read action perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would probably only be relevant for generic actions here? No need to change it for other actions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 yes, correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge at your liesure
Contributor checklist
Leave anything that you believe does not apply unchecked.