f210d9b749
* feat(projects): add project regions, default to null * feat(multiregion): add projectRegion Db client lookup logic * feat(multiregion): add project region repositories and caching * feat(multiRegion): db initialization and get project db client * feat(docker-compose): add second db for regions testing * feat(multiRegion): initialize region with pubs and subs working * fix(multiRegion): get region client even if it was registered in another pod * feat(workspaces): create workspace resolver split * feat: update server region metadata * feat(projects): rewrite project creation * feat(multiRegion): getRegionDb * fix(workspaces): get projects now can retur null * feat(multiRegion): make local multi region DB-s work * feat: set d efault workspace region * CR changes * tests * feat(multiRegion): bind region properly * fe update * test fixes * feat(multiRegion): automatically create aiven extras plugin * ci(postgres): use published postgres with aiven extras * fix(multiRegion): roll back the aiven extras migration, there is a better way * tests fix * fix(billing): we do not need to add a seat, if the workspace is on a plan, but has no sub --------- Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
70 lines
1.5 KiB
TypeScript
70 lines
1.5 KiB
TypeScript
import { graphql } from '~~/lib/common/generated/gql'
|
|
|
|
export const workspaceUpdateRoleMutation = graphql(`
|
|
mutation UpdateRole($input: WorkspaceRoleUpdateInput!) {
|
|
workspaceMutations {
|
|
updateRole(input: $input) {
|
|
team {
|
|
items {
|
|
id
|
|
role
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const inviteToWorkspaceMutation = graphql(`
|
|
mutation InviteToWorkspace(
|
|
$workspaceId: String!
|
|
$input: [WorkspaceInviteCreateInput!]!
|
|
) {
|
|
workspaceMutations {
|
|
invites {
|
|
batchCreate(workspaceId: $workspaceId, input: $input) {
|
|
id
|
|
invitedTeam {
|
|
...SettingsWorkspacesMembersInvitesTable_PendingWorkspaceCollaborator
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const createWorkspaceMutation = graphql(`
|
|
mutation CreateWorkspace($input: WorkspaceCreateInput!) {
|
|
workspaceMutations {
|
|
create(input: $input) {
|
|
id
|
|
...SettingsDialog_Workspace
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const processWorkspaceInviteMutation = graphql(`
|
|
mutation ProcessWorkspaceInvite($input: WorkspaceInviteUseInput!) {
|
|
workspaceMutations {
|
|
invites {
|
|
use(input: $input)
|
|
}
|
|
}
|
|
}
|
|
`)
|
|
|
|
export const setDefaultRegionMutation = graphql(`
|
|
mutation SetDefaultWorkspaceRegion($workspaceId: String!, $regionKey: String!) {
|
|
workspaceMutations {
|
|
setDefaultRegion(workspaceId: $workspaceId, regionKey: $regionKey) {
|
|
id
|
|
defaultRegion {
|
|
id
|
|
...SettingsWorkspacesRegionsSelect_ServerRegionItem
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`)
|