Add GetPagingArguments method to IResolverContext #3557
Labels
Area: Data
Issue is related to filtering, sorting, pagination or projections
🎉 enhancement
New feature or request
🙋 good first issue
Good for newcomers
🌶️ hot chocolate
⌛ stale
Nothing happened with this issue in quite a while
Milestone
At the moment I have to get arguments like "first" from the context myself.
All of this is already handled inside the PagingHandlers. We could extract this logic and make it accessible to consumers of the library.
I propose to add a new extension method like
GetPagingArguments
to theIResolverContext
, which would return theCursorPagingArguments
. (GetOffsetPagingArguments
respectively)This would match
AddPagingArguments
nicely and would reduce boilerplate.I think it could also be helpful, if these methods validate the arguments against the configured
PagingOptions
, i.e.DefaultPagingSize
andMaxPagingSize
.The text was updated successfully, but these errors were encountered: