MM-44088: Add teamID filter to channelMembers (#20176)
We add 2 new params to channel members query. 1. Filter by teamId. 2. Negate that filter. We include some more optimizations like: - Moved the team role checks inside the dataloader. - Moved the channel pretty name computation inside the loader. Now that we load less data on initial load, we can reduce the concurrency requirement to be a bit on the safer side. ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5ac3dbf058
Коммит
a6d8e45297
@@ -284,8 +284,8 @@ func generateLayer(name, templateFile string) ([]byte, error) {
|
||||
switch param.Type {
|
||||
case "ChannelSearchOpts", "UserGetByIdsOpts", "ThreadMembershipOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s store.%s", param.Name, param.Type))
|
||||
case "*UserGetByIdsOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.UserGetByIdsOpts", param.Name))
|
||||
case "*UserGetByIdsOpts", "*ChannelMemberGraphQLSearchOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.%s", param.Name, strings.TrimPrefix(param.Type, "*")))
|
||||
default:
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s %s", param.Name, param.Type))
|
||||
}
|
||||
@@ -298,8 +298,8 @@ func generateLayer(name, templateFile string) ([]byte, error) {
|
||||
switch param.Type {
|
||||
case "ChannelSearchOpts", "UserGetByIdsOpts", "ThreadMembershipOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s store.%s", param.Name, param.Type))
|
||||
case "*UserGetByIdsOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.UserGetByIdsOpts", param.Name))
|
||||
case "*UserGetByIdsOpts", "*ChannelMemberGraphQLSearchOpts":
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s *store.%s", param.Name, strings.TrimPrefix(param.Type, "*")))
|
||||
default:
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s %s", param.Name, param.Type))
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user