Add filtering active and human users in GraphQL
Adds filtering of the `users` GraphQL field to by human users and active users, through new optional `active: BOOLEAN` and `human: BOOLEAN` arguments. When the arguments are not provided the field will return the same users as it does currently. `UsersFinder` has been updated to allow: - Scoping humans `humans: true` - Scoping non-humans `without_humans: true` - Scoping non-active users `without_active: true` `/users` REST API endpoint has been updated to support the new users finder params. This work is to allows returning only active human users within a user mapping search. https://gitlab.com/gitlab-org/gitlab/-/issues/471933 Changelog: added
显示
- app/finders/users_finder.rb 25 个添加, 2 个删除app/finders/users_finder.rb
- app/graphql/resolvers/users_resolver.rb 16 个添加, 3 个删除app/graphql/resolvers/users_resolver.rb
- app/graphql/types/user_interface.rb 12 个添加, 0 个删除app/graphql/types/user_interface.rb
- app/models/concerns/has_user_type.rb 1 个添加, 0 个删除app/models/concerns/has_user_type.rb
- app/models/user.rb 1 个添加, 0 个删除app/models/user.rb
- doc/api/graphql/reference/index.md 20 个添加, 0 个删除doc/api/graphql/reference/index.md
- doc/api/users.md 15 个添加, 12 个删除doc/api/users.md
- lib/api/users.rb 5 个添加, 2 个删除lib/api/users.rb
- spec/finders/users_finder_spec.rb 41 个添加, 8 个删除spec/finders/users_finder_spec.rb
- spec/graphql/resolvers/users_resolver_spec.rb 39 个添加, 1 个删除spec/graphql/resolvers/users_resolver_spec.rb
- spec/graphql/types/user_type_spec.rb 2 个添加, 0 个删除spec/graphql/types/user_type_spec.rb
- spec/models/concerns/has_user_type_spec.rb 6 个添加, 0 个删除spec/models/concerns/has_user_type_spec.rb
- spec/models/user_spec.rb 13 个添加, 0 个删除spec/models/user_spec.rb
- spec/requests/api/users_spec.rb 55 个添加, 0 个删除spec/requests/api/users_spec.rb
- spec/support/shared_examples/graphql/types/merge_request_interactions_type_shared_examples.rb 2 个添加, 0 个删除.../types/merge_request_interactions_type_shared_examples.rb
加载中
想要评论请 注册 或 登录