This repository was archived by the owner on Sep 30, 2024. It is now read-only.
Team members query GraphQL resolvers - #47386
Merged
Merged
Conversation
cbart
marked this pull request as ready for review
February 3, 2023 22:36
cbart
marked this pull request as draft
February 3, 2023 22:36
cbart
marked this pull request as ready for review
February 3, 2023 22:37
eseliger
approved these changes
Feb 7, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #47043
This pull request adds resolvers for querying team members:
team/members(first,after,search)totalCountcountDeeplyNestedTeamMembersis not supported yet.pageInfonodessearchparameter is not tested for to keep the pull request size in check (it is already too long).The implementation leverages ginger-cake pattern based off teams connection resolver.
computeandapplyArgsacross connections.graphqlutil.ConnectionResolver?Test plan
Just one test case with graphQL query for team members' usernames with pagination.
This required however pretty substantial changes in test library:
Need to now fake
database.UserStorewith many users, so implemented a fake for that.Going down that rabbit hole - needed to apply that to faking admin actor/user (I think it is not too bad).
Setting up a context for an admin actor looks like this now:
I think this reads better than somewhat opaque (see
true), and heavily-destructuring:While setup now takes advantage of global variables (YOLO), to save from superfluous destructuring.
Before:
After: