Skip to content
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

Add GetPagingArguments method to IResolverContext #3557

Closed
tobias-tengler opened this issue Apr 20, 2021 · 1 comment
Closed

Add GetPagingArguments method to IResolverContext #3557

tobias-tengler opened this issue Apr 20, 2021 · 1 comment
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

Comments

@tobias-tengler
Copy link
Collaborator

tobias-tengler commented Apr 20, 2021

At the moment I have to get arguments like "first" from the context myself.

var first = context.ArgumentValue<int?>("first");

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 the IResolverContext, which would return the CursorPagingArguments. (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 and MaxPagingSize.

@tobias-tengler tobias-tengler added the Area: Data Issue is related to filtering, sorting, pagination or projections label Jun 26, 2021
@michaelstaib michaelstaib added this to the Backlog milestone Nov 22, 2021
@PascalSenn PascalSenn added the 🙋 good first issue Good for newcomers label Mar 16, 2022
@stale
Copy link

stale bot commented May 15, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the ⌛ stale Nothing happened with this issue in quite a while label May 15, 2022
@stale stale bot closed this as completed May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants