mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
feat(joyent-cp-gql-schema): add nested queries to more fields
- also, fix identation - remove redundant query type
This commit is contained in:
parent
6ab74d4216
commit
ebec51b965
@ -6,7 +6,7 @@
|
||||
id: ID!
|
||||
user: User!
|
||||
datacenter: Datacenter!
|
||||
deploymentGroups: [DeploymentGroup]
|
||||
deploymentGroups(name: String, slug: String): [DeploymentGroup]
|
||||
}
|
||||
|
||||
type User {
|
||||
@ -21,7 +21,7 @@
|
||||
id: ID!
|
||||
name: String!
|
||||
slug: String
|
||||
services(slug: String): [Service]
|
||||
services(name: String, slug: String, parentId: ID): [Service]
|
||||
version: Version
|
||||
history: [Version]
|
||||
}
|
||||
@ -40,23 +40,23 @@
|
||||
}
|
||||
|
||||
type ConvergenceAction {
|
||||
id: String!
|
||||
id: ID!
|
||||
type: ConvergenceActionType!
|
||||
service: String! # service name
|
||||
machines: [String]! # instance machine ids
|
||||
}
|
||||
|
||||
type StateConvergencePlan {
|
||||
id: String!
|
||||
id: ID!
|
||||
running: Boolean!
|
||||
actions: [ConvergenceAction]!
|
||||
actions(type: ConvergenceActionType, service: String): [ConvergenceAction]!
|
||||
}
|
||||
|
||||
type Version {
|
||||
created: Date! # Either Int or define scalar
|
||||
manifest: Manifest!
|
||||
scale: [ServiceScale]!
|
||||
plan: StateConvergencePlan
|
||||
scale(serviceName: String): [ServiceScale]!
|
||||
plan(running: Boolean): StateConvergencePlan
|
||||
}
|
||||
|
||||
enum ManifestType {
|
||||
@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
type Manifest {
|
||||
id: String!
|
||||
id: ID!
|
||||
created: Date!
|
||||
type: ManifestType!
|
||||
format: ManifestFormat!
|
||||
@ -80,11 +80,11 @@
|
||||
|
||||
# immutable
|
||||
type Service {
|
||||
id: String! # unique id for db row
|
||||
id: ID! # unique id for db row
|
||||
hash: String! # unique id for version of service
|
||||
name: String! # human readable name
|
||||
slug: String!
|
||||
instances: [Instance]!
|
||||
instances(name: String, machineId: ID, status: InstanceStatus): [Instance]!
|
||||
# metrics: [MetricType]!
|
||||
currentMetrics: [CurrentMetric]!
|
||||
connections: [String!] # list of serviceIds
|
||||
@ -123,15 +123,15 @@
|
||||
}
|
||||
|
||||
type Instance {
|
||||
id: String!
|
||||
id: ID!
|
||||
name: String!
|
||||
machineId: String!
|
||||
machineId: ID!
|
||||
status: InstanceStatus!
|
||||
# metrics: [InstanceMetric]!
|
||||
}
|
||||
|
||||
type Datacenter {
|
||||
id: String!
|
||||
id: ID!
|
||||
url: String!
|
||||
name: String!
|
||||
region: String!
|
||||
@ -149,9 +149,9 @@
|
||||
}
|
||||
|
||||
type MetricType {
|
||||
id: String!
|
||||
id: ID!
|
||||
name: String!
|
||||
id: String!
|
||||
id: ID!
|
||||
}
|
||||
|
||||
type MetricData {
|
||||
@ -159,23 +159,6 @@
|
||||
value: Float!
|
||||
}
|
||||
|
||||
# Need to review queries
|
||||
type Query {
|
||||
portal: Portal
|
||||
deploymentGroups: [DeploymentGroup]
|
||||
deploymentGroup(id: String, slug: String): DeploymentGroup
|
||||
services(deploymentGroupId: String, deploymentGroupSlug: String): [Service]
|
||||
service(id: String, slug: String): Service
|
||||
instances(serviceId: String, serviceSlug: String): [Instance]
|
||||
instance(id: String, machineId: String): Instance
|
||||
metricTypes: [MetricType]
|
||||
metricData(instanceId: String!, metricType: String!, from: Date!, to: Date!): [InstanceMetric]!
|
||||
package: Package
|
||||
datacenters: [Datacenter]
|
||||
# tmp test
|
||||
instanceMetric: InstanceMetric!
|
||||
}
|
||||
|
||||
# we probably wont use some of these queries or arguments
|
||||
# but this way we expose the entire db through gql
|
||||
type Query {
|
||||
|
Loading…
Reference in New Issue
Block a user