Open Chilinot opened 5 years ago
Do the loadPage
action and page
getter meet those needs? https://vuex.reststate.codingitwrong.com/reading-data.html#loadpage-action-page-getter
I dont think so. I currently have a resource A
that has a has_many
relation to resource B
.
Using B/loadRelated
with A
as parent will fetch all related resources. But there is no info regarding pages stored to the vuex store.
In order to use B/loadPage
i would have to write functionality in my backend for filtering based on relationship in the index function of B
. Considering the functionality is already there for querying those resources using the relationship links returned by A
it seems redundant from the view of the backend.
It would be nice to have a B/loadRelatedPage
or something similar.
Any updates? This is the most expected feature. It is much easer to get paginated comments by /posts/1/comments?page[size]=10 with posts/loadRelated but it's unable to get next page this way.
@TeroBlaZe I don't have availability to work on this right now. If you'd like to implement it, I'd be happy to review the PR.
FYI, this library will be unmaintained going forward.
If you need new features or fixes, I recommend forking the repo and making changes, or finding an alternate library that meets your needs.
The api im querying returns paginated lists when accessing related resources. It would be nice to have some simple getters for accessing the next and previous page similar to how normal resources work.