-
Notifications
You must be signed in to change notification settings - Fork 336
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
Clean up Organization.(viewerTeams, allTeams, publicTeams) #9917
Comments
If we fetch all teams with So a user that doesn't have the public teams flag and isn't a super user, org admin, or billing lead could see info about "Execs Top Secret Team". That was the scenario I was trying to avoid with the different endpoints, but I do agree that it's now a bit messy with 3 lists. Maybe we could re-instate We could also release public teams to everyone which would make the codebase cleaner. We've tested it for a while now without any push back. |
If we add an argument to the teams query we run into the same update issue I think Matt wants to avoid. If the query has different arguments, it needs to be updated separately in Relay as far as I know. |
OK cool, yeah, I think that'll work! |
Stale issue |
Going to keep this one open as we've all engaged in forming a solution |
I noticed about 8 months ago we got rid of the resolver for
Organization.teams
& more recently we we added some new fields that can get queried. I hit a bug becauseOrganization.teams
is valid GQL, butteams
doesn't have a resolver!My tension here with having
viewerTeams, allTeams, publicTeams
is that these 3 lists can get out of sync with each other. E.g. if a team gets added, the client has to be sure to fetch that team under all 3 lists or it will be missing from 1 list but not the others! Less importantly, it triples the amount of data sent because if I have 100 teams, then I'll have to send data for300 teams, 100 for each list.Instead, since all 3 return a list of teams that the viewer can access, I propose we re-instate the
Organization.teams
resolver & get rid of these 3. Then, to determine if it's a public team that the user isn't on, we just checkTeam.isViewerOnTeam
.@nickoferrall since you worked on this recently I wanted to get your thoughts on this direction
AC
The text was updated successfully, but these errors were encountered: