-
Notifications
You must be signed in to change notification settings - Fork 5
/
schema.graphql
451 lines (440 loc) · 12.4 KB
/
schema.graphql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
"""This directive is used to prefix the ID of an object with a given string."""
directive @prefixedID(prefix: String!) on OBJECT
"""Input information to create a virtual machine cpu config."""
input CreateVirtualMachineCPUConfigInput {
"""The number of cores for this virtual machine."""
cores: Int!
"""The number of sockets for this virtual machine."""
sockets: Int!
virtualMachineID: ID
}
"""Create a new virtual machine."""
input CreateVirtualMachineInput {
"""The name of the Virtual Machine."""
name: String!
"""The ID for the owner of this Virtual Machine."""
ownerID: ID!
"""The ID for the location of this virtual machine."""
locationID: ID!
"""The userdata for this virtual machine."""
userdata: String
virtualMachineCPUConfigID: ID!
virtualMachineMemoryConfigID: ID!
}
"""Input information to create a virtual machine memory config."""
input CreateVirtualMachineMemoryConfigInput {
"""The size of memory for this virtual machine."""
size: Int
virtualMachineID: ID
}
"""
Define a Relay Cursor type:
https://relay.dev/graphql/connections.htm#sec-Cursor
"""
scalar Cursor
"""A valid JSON string."""
scalar JSON
type Location @key(fields: "id") {
id: ID!
virtualMachines(
"""Returns the elements in the list that come after the specified cursor."""
after: Cursor
"""Returns the first _n_ elements from the list."""
first: Int
"""Returns the elements in the list that come before the specified cursor."""
before: Cursor
"""Returns the last _n_ elements from the list."""
last: Int
"""Ordering options for VirtualMachine returned from the connection."""
orderBy: VirtualMachineOrder
"""Filtering options for VirtualMachine returned from the connection."""
where: VirtualMachineWhereInput
): VirtualMachineConnection!
}
"""
An object with an ID.
Follows the [Relay Global Object Identification Specification](https://relay.dev/graphql/objectidentification.htm)
"""
interface Node {
"""The id of the object."""
id: ID!
}
"""Possible directions in which to order a list of items when provided an `orderBy` argument."""
enum OrderDirection {
"""Specifies an ascending order for a given `orderBy` argument."""
ASC
"""Specifies a descending order for a given `orderBy` argument."""
DESC
}
"""
Information about pagination in a connection.
https://relay.dev/graphql/connections.htm#sec-undefined.PageInfo
"""
type PageInfo @shareable {
"""When paginating forwards, are there more items?"""
hasNextPage: Boolean!
"""When paginating backwards, are there more items?"""
hasPreviousPage: Boolean!
"""When paginating backwards, the cursor to continue."""
startCursor: Cursor
"""When paginating forwards, the cursor to continue."""
endCursor: Cursor
}
type Query {
"""Lookup a virtual machine by ID."""
virtualMachine(
"""The virtual machine ID."""
id: ID!
): VirtualMachine!
"""Lookup a virtual machine cpu config by ID."""
virtualMachineCPUConfig(
"""The virtual machine cpu config ID."""
id: ID!
): VirtualMachineCPUConfig!
"""Lookup a virtual machine memory config by ID."""
virtualMachineMemoryConfig(
"""The virtual machine memory config ID."""
id: ID!
): VirtualMachineMemoryConfig!
_entities(representations: [_Any!]!): [_Entity]!
_service: _Service!
}
type ResourceOwner @key(fields: "id") @interfaceObject {
id: ID!
virtualMachine(
"""Returns the elements in the list that come after the specified cursor."""
after: Cursor
"""Returns the first _n_ elements from the list."""
first: Int
"""Returns the elements in the list that come before the specified cursor."""
before: Cursor
"""Returns the last _n_ elements from the list."""
last: Int
"""Ordering options for VirtualMachines returned from the connection."""
orderBy: VirtualMachineOrder
"""Filtering options for VirtualMachines returned from the connection."""
where: VirtualMachineWhereInput
): VirtualMachineConnection!
}
"""The builtin Time type"""
scalar Time
"""Input information to update a virtual machine cpu config."""
input UpdateVirtualMachineCPUConfigInput {
"""The number of cores for this virtual machine."""
cores: Int
"""The number of sockets for this virtual machine."""
sockets: Int
}
"""Update an existing virtual machine."""
input UpdateVirtualMachineInput {
"""The name of the Virtual Machine."""
name: String
"""The userdata for this virtual machine."""
userdata: String
clearUserdata: Boolean
}
"""Input information to update a virtual machine memory config."""
input UpdateVirtualMachineMemoryConfigInput {
"""The size of memory for this virtual machine."""
size: Int
}
type VirtualMachine implements Node @key(fields: "id") @prefixedID(prefix: "virtmac") {
"""The ID of the VirtualMachine."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The name of the Virtual Machine."""
name: String!
"""The userdata for this virtual machine."""
userdata: String
"""The ID for the virtual machine cpu config."""
vmCPUConfigID: ID!
"""The ID for the virtual machine memory config."""
vmMemoryConfigID: ID!
"""The virtual machine cpu config for the virtual machine."""
virtualMachineCPUConfig: VirtualMachineCPUConfig!
"""The memory config for the virtual machine."""
virtualMachineMemoryConfig: VirtualMachineMemoryConfig!
"""The location of the load balancer."""
location: Location!
"""The owner of the VirtualMachine"""
owner: ResourceOwner!
}
type VirtualMachineCPUConfig implements Node @key(fields: "id") @prefixedID(prefix: "virtmac") {
"""The ID for the virtual machaine cpu config."""
id: ID!
"""The number of cores for this virtual machine."""
cores: Int!
"""The number of sockets for this virtual machine."""
sockets: Int!
virtualMachine: VirtualMachine
}
"""A connection to a list of items."""
type VirtualMachineCPUConfigConnection {
"""A list of edges."""
edges: [VirtualMachineCPUConfigEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""An edge in a connection."""
type VirtualMachineCPUConfigEdge {
"""The item at the end of the edge."""
node: VirtualMachineCPUConfig
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for VirtualMachineCPUConfig connections"""
input VirtualMachineCPUConfigOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order VirtualMachineCPUConfigs."""
field: VirtualMachineCPUConfigOrderField!
}
"""Properties by which VirtualMachineCPUConfig connections can be ordered."""
enum VirtualMachineCPUConfigOrderField {
ID
cores
sockets
}
"""
VirtualMachineCPUConfigWhereInput is used for filtering VirtualMachineCPUConfig objects.
Input was generated by ent.
"""
input VirtualMachineCPUConfigWhereInput {
not: VirtualMachineCPUConfigWhereInput
and: [VirtualMachineCPUConfigWhereInput!]
or: [VirtualMachineCPUConfigWhereInput!]
"""id field predicates"""
id: ID
idNEQ: ID
idIn: [ID!]
idNotIn: [ID!]
idGT: ID
idGTE: ID
idLT: ID
idLTE: ID
"""cores field predicates"""
cores: Int
coresNEQ: Int
coresIn: [Int!]
coresNotIn: [Int!]
coresGT: Int
coresGTE: Int
coresLT: Int
coresLTE: Int
"""sockets field predicates"""
sockets: Int
socketsNEQ: Int
socketsIn: [Int!]
socketsNotIn: [Int!]
socketsGT: Int
socketsGTE: Int
socketsLT: Int
socketsLTE: Int
"""virtual_machine edge predicates"""
hasVirtualMachine: Boolean
hasVirtualMachineWith: [VirtualMachineWhereInput!]
}
"""A connection to a list of items."""
type VirtualMachineConnection {
"""A list of edges."""
edges: [VirtualMachineEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""An edge in a connection."""
type VirtualMachineEdge {
"""The item at the end of the edge."""
node: VirtualMachine
"""A cursor for use in pagination."""
cursor: Cursor!
}
type VirtualMachineMemoryConfig implements Node @key(fields: "id") @prefixedID(prefix: "virtmac") {
"""The ID for the virtual machine memory config."""
id: ID!
"""The size of memory for this virtual machine."""
size: Int!
virtualMachine: VirtualMachine
}
"""A connection to a list of items."""
type VirtualMachineMemoryConfigConnection {
"""A list of edges."""
edges: [VirtualMachineMemoryConfigEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""An edge in a connection."""
type VirtualMachineMemoryConfigEdge {
"""The item at the end of the edge."""
node: VirtualMachineMemoryConfig
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for VirtualMachineMemoryConfig connections"""
input VirtualMachineMemoryConfigOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order VirtualMachineMemoryConfigs."""
field: VirtualMachineMemoryConfigOrderField!
}
"""Properties by which VirtualMachineMemoryConfig connections can be ordered."""
enum VirtualMachineMemoryConfigOrderField {
ID
SIZE
}
"""
VirtualMachineMemoryConfigWhereInput is used for filtering VirtualMachineMemoryConfig objects.
Input was generated by ent.
"""
input VirtualMachineMemoryConfigWhereInput {
not: VirtualMachineMemoryConfigWhereInput
and: [VirtualMachineMemoryConfigWhereInput!]
or: [VirtualMachineMemoryConfigWhereInput!]
"""id field predicates"""
id: ID
idNEQ: ID
idIn: [ID!]
idNotIn: [ID!]
idGT: ID
idGTE: ID
idLT: ID
idLTE: ID
"""size field predicates"""
size: Int
sizeNEQ: Int
sizeIn: [Int!]
sizeNotIn: [Int!]
sizeGT: Int
sizeGTE: Int
sizeLT: Int
sizeLTE: Int
"""virtual_machine edge predicates"""
hasVirtualMachine: Boolean
hasVirtualMachineWith: [VirtualMachineWhereInput!]
}
"""Ordering options for VirtualMachine connections"""
input VirtualMachineOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order VirtualMachines."""
field: VirtualMachineOrderField!
}
"""Properties by which VirtualMachine connections can be ordered."""
enum VirtualMachineOrderField {
ID
CREATED_AT
UPDATED_AT
NAME
OWNER
VM_CPU_CONFIG
VM_MEMORY_CONFIG
}
"""
VirtualMachineWhereInput is used for filtering VirtualMachine objects.
Input was generated by ent.
"""
input VirtualMachineWhereInput {
not: VirtualMachineWhereInput
and: [VirtualMachineWhereInput!]
or: [VirtualMachineWhereInput!]
"""id field predicates"""
id: ID
idNEQ: ID
idIn: [ID!]
idNotIn: [ID!]
idGT: ID
idGTE: ID
idLT: ID
idLTE: ID
"""created_at field predicates"""
createdAt: Time
createdAtNEQ: Time
createdAtIn: [Time!]
createdAtNotIn: [Time!]
createdAtGT: Time
createdAtGTE: Time
createdAtLT: Time
createdAtLTE: Time
"""updated_at field predicates"""
updatedAt: Time
updatedAtNEQ: Time
updatedAtIn: [Time!]
updatedAtNotIn: [Time!]
updatedAtGT: Time
updatedAtGTE: Time
updatedAtLT: Time
updatedAtLTE: Time
"""name field predicates"""
name: String
nameNEQ: String
nameIn: [String!]
nameNotIn: [String!]
nameGT: String
nameGTE: String
nameLT: String
nameLTE: String
nameContains: String
nameHasPrefix: String
nameHasSuffix: String
nameEqualFold: String
nameContainsFold: String
"""vm_cpu_config_id field predicates"""
vmCPUConfigID: ID
vmCPUConfigIDNEQ: ID
vmCPUConfigIDIn: [ID!]
vmCPUConfigIDNotIn: [ID!]
vmCPUConfigIDGT: ID
vmCPUConfigIDGTE: ID
vmCPUConfigIDLT: ID
vmCPUConfigIDLTE: ID
vmCPUConfigIDContains: ID
vmCPUConfigIDHasPrefix: ID
vmCPUConfigIDHasSuffix: ID
vmCPUConfigIDEqualFold: ID
vmCPUConfigIDContainsFold: ID
"""vm_memory_config_id field predicates"""
vmMemoryConfigID: ID
vmMemoryConfigIDNEQ: ID
vmMemoryConfigIDIn: [ID!]
vmMemoryConfigIDNotIn: [ID!]
vmMemoryConfigIDGT: ID
vmMemoryConfigIDGTE: ID
vmMemoryConfigIDLT: ID
vmMemoryConfigIDLTE: ID
vmMemoryConfigIDContains: ID
vmMemoryConfigIDHasPrefix: ID
vmMemoryConfigIDHasSuffix: ID
vmMemoryConfigIDEqualFold: ID
vmMemoryConfigIDContainsFold: ID
"""virtual_machine_cpu_config edge predicates"""
hasVirtualMachineCPUConfig: Boolean
hasVirtualMachineCPUConfigWith: [VirtualMachineCPUConfigWhereInput!]
"""virtual_machine_memory_config edge predicates"""
hasVirtualMachineMemoryConfig: Boolean
hasVirtualMachineMemoryConfigWith: [VirtualMachineMemoryConfigWhereInput!]
}
scalar _Any
union _Entity = Location | ResourceOwner | VirtualMachine | VirtualMachineCPUConfig | VirtualMachineMemoryConfig
type _Service {
sdl: String
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.3"
import: [
"@key",
"@interfaceObject",
"@shareable",
"@inaccessible",
"@override",
"@provides",
"@requires",
"@tag"
]
)