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 SetUser extension to IQueryRequestBuilder #6093

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Conversation

tobias-tengler
Copy link
Collaborator

We already created such an extension in our own project, but I was reminded again today by Michael's video that it would probably be a good idea to expose this method as part of the library.
I called the method SetUser to have a symmetry to the already existing GetUser method on the IResolverContext.

Example:

var request = QueryRequestBuilder.New()
    .SetQuery("{ me { name } }")
    .SetUser(new ClaimsPrincipal())
    .Create();

@tobias-tengler tobias-tengler added the 👓 ready-for-review The PR is ready for review. label Apr 26, 2023
@michaelstaib michaelstaib merged commit 3dfa4ec into main Apr 27, 2023
@michaelstaib michaelstaib deleted the tte/set-user branch April 27, 2023 07:38
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.

2 participants