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
Is your feature request related to a problem? Please describe.
This is a presequisite for ash-project/ash_graphql#131, opening it here to focus the discussion on the core part
Describe the solution you'd like
It should be possible to paginate a relationship by passing an appropriate Query. This would allow to have pagination for nested relationships for extensions that support this (like, potentially, AshGraphql).
Express the feature either with a change to resource syntax, or with a change to the resource interface
Right now the only place where pagination can be configured is in action options, i.e. passing page: [offset: 3, limit: 10] to Ash.read or similar functions. To be able to setup pagination in nested loads, we will probably have to add some function and/or option on Query (and Changeset, since those have loads too). This should be similar to what is already done with, e.g., tenant, which can be set both on the Query and as an action option.
This would be a welcome feature. I attempted to add this a long time ago, but the codebase wasn't in a good place for that. In its current state, I think it is much more doable. There may be some finicky bits since what must currently be a list could now be a page, but we can work those things out without too much hassle I think.
Is your feature request related to a problem? Please describe.
This is a presequisite for ash-project/ash_graphql#131, opening it here to focus the discussion on the core part
Describe the solution you'd like
It should be possible to paginate a relationship by passing an appropriate
Query
. This would allow to have pagination for nested relationships for extensions that support this (like, potentially, AshGraphql).Express the feature either with a change to resource syntax, or with a change to the resource interface
Right now the only place where pagination can be configured is in action options, i.e. passing
page: [offset: 3, limit: 10]
toAsh.read
or similar functions. To be able to setup pagination in nested loads, we will probably have to add some function and/or option onQuery
(andChangeset
, since those have loads too). This should be similar to what is already done with, e.g.,tenant
, which can be set both on theQuery
and as an action option.Potential syntax:
The text was updated successfully, but these errors were encountered: