"An error occurred while fetching participants." when clicking on board card item
Summary
When the sidebar is expanded in issue boards, an error message is flashed "An error occurred while fetching participants."
Screen_Recording_2021-05-03_at_2.08.27_PM
Steps to reproduce
- https://staging.gitlab.com/groups/gitlab-org/-/boards
- https://gitlab.com/groups/gitlab-org/plan-stage/-/boards
Example Project
Visit the group or project issue boards for gitlab-org
:
Group boards: https://gitlab.com/groups/gitlab-org/-/boards
Project boards: https://gitlab.com/gitlab-org/gitlab/-/boards
What is causing the error?
The following query used in the assignee widget component is returning null
as nodes:
usersSearchQuery
query usersSearch($search: String!, $fullPath: ID!) {
workspace: project(fullPath: $fullPath) {
users: projectMembers(search: $search, relations: [DIRECT, INHERITED, INVITED_GROUPS]) {
nodes {
user {
id
avatarUrl
name
username
webUrl
}
}
}
}
}
// arguments
{
"first": 20,
"fullPath": "gitlab-org/gitlab",
"search": ""
}
Query response
{
"data": {
"workspace": {
"users": {
"nodes": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
{
"user": {
"id": "gid://gitlab/User/8802897",
"avatarUrl": "https://secure.gravatar.com/avatar/be3664e0a2e10d06d5d9bcb979ef3fa9?s=80&d=identicon",
"name": "Louis Vasquez",
"username": "Lvasquez00887",
"webUrl": "https://gitlab.com/Lvasquez00887"
}
},
...
Possible fixes
Needs more investigation from the backend side.
Possible temporary workaround on frontend
- Removing
INVITED_GROUP
in theusersSearch
query removes the null nodes
Edited by euko