fix(workspaces): add filtering to workspace team query (#2586)
* chore(workspaces): add some tests for new filters * fix(workspaces): args style
This commit is contained in:
@@ -11,12 +11,10 @@ export const workspaceFragment = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const workspaceTeamFragment = gql`
|
||||
fragment TestWorkspaceTeam on Workspace {
|
||||
team {
|
||||
id
|
||||
role
|
||||
}
|
||||
export const workspaceCollaboratorFragment = gql`
|
||||
fragment TestWorkspaceCollaborator on WorkspaceCollaborator {
|
||||
id
|
||||
role
|
||||
}
|
||||
`
|
||||
|
||||
@@ -29,6 +27,15 @@ export const workspaceProjectFragment = gql`
|
||||
}
|
||||
`
|
||||
|
||||
export const workspaceTeamFragment = gql`
|
||||
fragment TestWorkspaceTeam on Workspace {
|
||||
team {
|
||||
id
|
||||
role
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
export const createWorkspaceQuery = gql`
|
||||
mutation CreateWorkspace($input: WorkspaceCreateInput!) {
|
||||
workspaceMutations {
|
||||
@@ -107,7 +114,7 @@ export const createWorkspaceProjectQuery = gql`
|
||||
${workspaceProjectFragment}
|
||||
`
|
||||
|
||||
export const getWorkspaceProjects = gql`
|
||||
export const getWorkspaceProjectsQuery = gql`
|
||||
query GetWorkspaceProjects(
|
||||
$id: String!
|
||||
$limit: Int
|
||||
@@ -127,6 +134,17 @@ export const getWorkspaceProjects = gql`
|
||||
${workspaceProjectFragment}
|
||||
`
|
||||
|
||||
export const getWorkspaceTeamQuery = gql`
|
||||
query GetWorkspaceTeam($workspaceId: String!, $filter: WorkspaceTeamFilter) {
|
||||
workspace(id: $workspaceId) {
|
||||
team(filter: $filter) {
|
||||
...TestWorkspaceCollaborator
|
||||
}
|
||||
}
|
||||
}
|
||||
${workspaceCollaboratorFragment}
|
||||
`
|
||||
|
||||
export const leaveWorkspaceMutation = gql`
|
||||
mutation ActiveUserLeaveWorkspace($id: ID!) {
|
||||
activeUserMutations {
|
||||
|
||||
Reference in New Issue
Block a user