fix(workspaces): add pagination to workspace team members (#2644)
* fix(workspaces): a suggestion of paginated teams * fix(workspaces): workspace team pagination (?) * fix(workspaces): pagination based on acl createdAt * fix(workspaces): fix some roles-related tests * fix(workspaces): improve query and tests * fix(workspaces): collaborators query without incorrect groupBy * fix(workspaces): add default values to migration * Fixed queries and fragments * Merged main * Remove comment * chore(workspaces): update WorkspaceCollaboratorCollection mocks * chore(workspaces): fix role test * chore(workspaces); ope * fix(workspaces): move workspace acl timestamps to separate table * Merge? * fix(workspaces) drop that table * fix(workspaces): cursor * fix(workspaceInvites): undo merge borkage * fix(workspaces): rework workspace member pagination * fix(workspaces): fix test * fix(workspaces): test test * fix(workspaces): literally garbage --------- Co-authored-by: Mike Tasset <mike.tasset@gmail.com> Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
This commit is contained in:
@@ -154,7 +154,23 @@ const config: SpeckleModuleMocksConfig = FF_WORKSPACES_MODULE_ENABLED
|
||||
},
|
||||
Workspace: {
|
||||
role: resolveFromMockParent(),
|
||||
team: resolveFromMockParent(),
|
||||
team: resolveAndCache((_parent, args) => {
|
||||
const id = faker.string.uuid()
|
||||
return getMockRef('WorkspaceCollaboratorCollection', {
|
||||
values: {
|
||||
items: [...new Array(args.limit)].map(() => ({
|
||||
id,
|
||||
role: faker.helpers.arrayElement(Object.values(Roles.Workspace)),
|
||||
user: {
|
||||
id,
|
||||
name: faker.person.fullName()
|
||||
}
|
||||
})),
|
||||
totalCount: args.limit,
|
||||
cursor: null
|
||||
}
|
||||
})
|
||||
}),
|
||||
invitedTeam: resolveFromMockParent({
|
||||
mapRefs: (mock, { parent }) =>
|
||||
addMockRefValues(mock, {
|
||||
@@ -224,7 +240,6 @@ const config: SpeckleModuleMocksConfig = FF_WORKSPACES_MODULE_ENABLED
|
||||
name: workspaceName(),
|
||||
description: faker.lorem.sentence(),
|
||||
role: faker.helpers.arrayElement(Object.values(Roles.Workspace)),
|
||||
team: listMock(1, 5),
|
||||
invitedTeam: listMock(1, 5)
|
||||
}),
|
||||
WorkspaceCollaborator: () => ({
|
||||
|
||||
Reference in New Issue
Block a user