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 to the ResolverContext #3566

Closed
wants to merge 2 commits into from

Conversation

tobias-tengler
Copy link
Collaborator

When working with AddPagingArguments you can now easily retrieve all these arguments, by calling:

descriptor
    .Field("users")
    .AddPagingArguments()
    // ...
    .Resolve(context =>
    {
        CursorPagingArguments arguments = context.GetPagingArguments();

        // ...
    });

There's a new extension method for usage with AddOffsetPagingArguments as well: context.GetOffsetPagingArguments().

Closes #3557

@tobias-tengler tobias-tengler added the 🎉 enhancement New feature or request label Apr 21, 2021
@sonarcloud
Copy link

sonarcloud bot commented Apr 21, 2021

@tobias-tengler
Copy link
Collaborator Author

Not sure why this one test was failing before, but I've reverted all areas, where this breakage could've come from, even though I couldn't see any breaking changes...
Also a lot of tests of the Core package are failing for me, when I execute them In Visual Studio. Also on the main branch. Not sure what's up with that.

I'm also not sure yet, how I would handle PagingOptions with my approach. Let me mark this as draft again...

@tobias-tengler tobias-tengler marked this pull request as draft April 21, 2021 21:13
@tobias-tengler
Copy link
Collaborator Author

Any good ideas on how I could access the PagingOptions configured for the middleware inside the resolver? I thought about using the context, but the global PagingOptions are already on there.

@michaelstaib
Copy link
Member

Is the his ready for review?

@tobias-tengler
Copy link
Collaborator Author

Is the his ready for review?

Nope, I actually forgot about this PR, since I couldn't solve it with the old pagination API. Will revisit in the coming days.

@michaelstaib michaelstaib changed the base branch from main to develop August 31, 2021 09:20
@sonarcloud
Copy link

sonarcloud bot commented Aug 31, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@sergiu-enache
Copy link

hi @tobias-tengler did you figure out how to access PagingOptions from a resolver? I am facing a similar issue.
Also how do you get the global PagingOptions from the context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add GetPagingArguments method to IResolverContext
3 participants