5df716bf1c
* WIP create modal * babababa * create dialog looks ok * FE largely there * workss * cleanup * fixed up test plumbing to avoid deadlocks and simplify GQL calls * test fix * added all tests * CI fix
49 lines
823 B
TypeScript
49 lines
823 B
TypeScript
import gql from 'graphql-tag'
|
|
|
|
export const mainRegionMetadataFragment = gql`
|
|
fragment MainRegionMetadata on ServerRegionItem {
|
|
id
|
|
key
|
|
name
|
|
description
|
|
}
|
|
`
|
|
|
|
export const getAvailableRegionKeysQuery = gql`
|
|
query GetAvailableRegionKeys {
|
|
serverInfo {
|
|
multiRegion {
|
|
availableKeys
|
|
}
|
|
}
|
|
}
|
|
`
|
|
|
|
export const createRegionMutation = gql`
|
|
mutation CreateNewRegion($input: CreateServerRegionInput!) {
|
|
serverInfoMutations {
|
|
multiRegion {
|
|
create(input: $input) {
|
|
...MainRegionMetadata
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
${mainRegionMetadataFragment}
|
|
`
|
|
|
|
export const getRegionsQuery = gql`
|
|
query GetRegions {
|
|
serverInfo {
|
|
multiRegion {
|
|
regions {
|
|
...MainRegionMetadata
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
${mainRegionMetadataFragment}
|
|
`
|