-
Notifications
You must be signed in to change notification settings - Fork 8
/
schema.graphql
606 lines (587 loc) · 14.8 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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
directive @prefixedID(prefix: String!) on OBJECT
"""Create a new ip address type node."""
input CreateIPAddressInput {
"""The ip address."""
ip: String!
"""The ID for the node this is assigned to."""
nodeID: ID!
"""Owner ID of the node this is assigned to."""
nodeOwnerID: ID!
"""Reserve the IP without it being assigned."""
reserved: Boolean
ipBlockID: ID!
}
"""Create a new ip block type node."""
input CreateIPBlockInput {
"""The prefix of the ip block."""
prefix: String!
"""The ID for the location for this ip block."""
locationID: ID!
"""The ID for the parent of this ip block."""
parentBlockID: ID!
"""Allow carving this block into smaller subnets."""
allowAutoSubnet: Boolean
"""Allow automatically assigning IPs directly from this block."""
allowAutoAllocate: Boolean
ipBlockTypeID: ID!
}
"""Create a new ip block type node."""
input CreateIPBlockTypeInput {
"""The name of the ip block type."""
name: String!
"""The ID for the owner for this ip block type."""
ownerID: ID!
}
"""
Define a Relay Cursor type:
https://relay.dev/graphql/connections.htm#sec-Cursor
"""
scalar Cursor
type IPAddress implements Node @key(fields: "id") @prefixedID(prefix: "ipamipa") {
"""The ID of the IP Address."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The ip address."""
ip: String!
"""Reserve the IP without it being assigned."""
reserved: Boolean!
ipBlock: IPBlock!
"""IPAddresses that are associated with a given node"""
node: IPAddressable!
}
"""A connection to a list of items."""
type IPAddressConnection {
"""A list of edges."""
edges: [IPAddressEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""Return response for createIPAddress mutation"""
type IPAddressCreatePayload {
"""Created ip address"""
ipAddress: IPAddress!
}
"""Return response for deleteIPAddress mutation"""
type IPAddressDeletePayload {
"""Deleted ip address ID"""
deletedID: ID!
}
"""An edge in a connection."""
type IPAddressEdge {
"""The item at the end of the edge."""
node: IPAddress
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for IPAddress connections"""
input IPAddressOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order IPAddresses."""
field: IPAddressOrderField!
}
"""Properties by which IPAddress connections can be ordered."""
enum IPAddressOrderField {
ID
CREATED_AT
UPDATED_AT
IP
BLOCK
NODE
OWNER
RESERVED
}
"""Return response for updateIPAddress mutation"""
type IPAddressUpdatePayload {
"""Updated ip address"""
ipAddress: IPAddress!
}
"""
IPAddressWhereInput is used for filtering IPAddress objects.
Input was generated by ent.
"""
input IPAddressWhereInput {
not: IPAddressWhereInput
and: [IPAddressWhereInput!]
or: [IPAddressWhereInput!]
"""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
"""IP field predicates"""
ip: String
ipNEQ: String
ipIn: [String!]
ipNotIn: [String!]
ipGT: String
ipGTE: String
ipLT: String
ipLTE: String
ipContains: String
ipHasPrefix: String
ipHasSuffix: String
ipEqualFold: String
ipContainsFold: String
"""reserved field predicates"""
reserved: Boolean
reservedNEQ: Boolean
"""ip_block edge predicates"""
hasIPBlock: Boolean
hasIPBlockWith: [IPBlockWhereInput!]
}
"""IPAddressable provides an interface for describing IP addresses attached to a node"""
type IPAddressable @key(fields: "id") @interfaceObject {
id: ID!
"""IPAddressable describes IP addresses attached to a node"""
IPAddresses: [IPAddress]!
}
type IPBlock implements Node @key(fields: "id") @prefixedID(prefix: "ipamibk") {
"""The ID of the IP Block."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The prefix of the ip block."""
prefix: String!
"""Allow carving this block into smaller subnets."""
allowAutoSubnet: Boolean!
"""Allow automatically assigning IPs directly from this block."""
allowAutoAllocate: Boolean!
ipBlockType: IPBlockType!
ipAddress(
"""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 IPAddresses returned from the connection."""
orderBy: IPAddressOrder
"""Filtering options for IPAddresses returned from the connection."""
where: IPAddressWhereInput
): IPAddressConnection!
}
"""A connection to a list of items."""
type IPBlockConnection {
"""A list of edges."""
edges: [IPBlockEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""Return response for createIPBlock mutation"""
type IPBlockCreatePayload {
"""Created ip block"""
ipBlock: IPBlock!
}
"""Return response for deleteIPBlock mutation"""
type IPBlockDeletePayload {
"""Deleted ip block"""
deletedID: ID!
}
"""An edge in a connection."""
type IPBlockEdge {
"""The item at the end of the edge."""
node: IPBlock
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for IPBlock connections"""
input IPBlockOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order IPBlocks."""
field: IPBlockOrderField!
}
"""Properties by which IPBlock connections can be ordered."""
enum IPBlockOrderField {
ID
CREATED_AT
UPDATED_AT
PREFIX
BLOCK_TYPE
LOCATION
PARENT_BLOCK
AUTOSUBNET
AUTOALLOCATE
}
type IPBlockType implements Node @key(fields: "id") @prefixedID(prefix: "ipamibt") {
"""The ID of the IP Block Type."""
id: ID!
createdAt: Time!
updatedAt: Time!
"""The name of the ip block type."""
name: String!
ipBlock(
"""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 IPBlocks returned from the connection."""
orderBy: IPBlockOrder
"""Filtering options for IPBlocks returned from the connection."""
where: IPBlockWhereInput
): IPBlockConnection!
"""The owner of the ip block type."""
owner: ResourceOwner!
}
"""A connection to a list of items."""
type IPBlockTypeConnection {
"""A list of edges."""
edges: [IPBlockTypeEdge]
"""Information to aid in pagination."""
pageInfo: PageInfo!
"""Identifies the total count of items in the connection."""
totalCount: Int!
}
"""Return response for createIPBlockType mutation"""
type IPBlockTypeCreatePayload {
"""Created ip block type"""
ipBlockType: IPBlockType!
}
"""Return response for deleteIPBlockType mutation"""
type IPBlockTypeDeletePayload {
"""Deleted ip block type"""
deletedID: ID!
}
"""An edge in a connection."""
type IPBlockTypeEdge {
"""The item at the end of the edge."""
node: IPBlockType
"""A cursor for use in pagination."""
cursor: Cursor!
}
"""Ordering options for IPBlockType connections"""
input IPBlockTypeOrder {
"""The ordering direction."""
direction: OrderDirection! = ASC
"""The field by which to order IPBlockTypes."""
field: IPBlockTypeOrderField!
}
"""Properties by which IPBlockType connections can be ordered."""
enum IPBlockTypeOrderField {
ID
CREATED_AT
UPDATED_AT
NAME
OWNER
}
"""Return response for updateIPBlockType mutation"""
type IPBlockTypeUpdatePayload {
"""Updated ip block type"""
ipBlockType: IPBlockType!
}
"""
IPBlockTypeWhereInput is used for filtering IPBlockType objects.
Input was generated by ent.
"""
input IPBlockTypeWhereInput {
not: IPBlockTypeWhereInput
and: [IPBlockTypeWhereInput!]
or: [IPBlockTypeWhereInput!]
"""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
"""ip_block edge predicates"""
hasIPBlock: Boolean
hasIPBlockWith: [IPBlockWhereInput!]
}
"""Return response for updateIPBlock mutation"""
type IPBlockUpdatePayload {
"""Updated ip block"""
ipBlock: IPBlock!
}
"""
IPBlockWhereInput is used for filtering IPBlock objects.
Input was generated by ent.
"""
input IPBlockWhereInput {
not: IPBlockWhereInput
and: [IPBlockWhereInput!]
or: [IPBlockWhereInput!]
"""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
"""prefix field predicates"""
prefix: String
prefixNEQ: String
prefixIn: [String!]
prefixNotIn: [String!]
prefixGT: String
prefixGTE: String
prefixLT: String
prefixLTE: String
prefixContains: String
prefixHasPrefix: String
prefixHasSuffix: String
prefixEqualFold: String
prefixContainsFold: String
"""allow_auto_subnet field predicates"""
allowAutoSubnet: Boolean
allowAutoSubnetNEQ: Boolean
"""allow_auto_allocate field predicates"""
allowAutoAllocate: Boolean
allowAutoAllocateNEQ: Boolean
"""ip_block_type edge predicates"""
hasIPBlockType: Boolean
hasIPBlockTypeWith: [IPBlockTypeWhereInput!]
"""ip_address edge predicates"""
hasIPAddress: Boolean
hasIPAddressWith: [IPAddressWhereInput!]
}
"""A valid JSON string."""
scalar JSON
type Mutation {
"""Create a new ip address"""
createIPAddress(
"""values of the ip address"""
input: CreateIPAddressInput!
): IPAddressCreatePayload!
"""Update an existing ip address"""
updateIPAddress(
"""ID of the ip address"""
id: ID!
"""New values for the ip address"""
input: UpdateIPAddressInput!
): IPAddressUpdatePayload!
"""Delete an existing ip address"""
deleteIPAddress(
"""ID of the ip address"""
id: ID!
): IPAddressDeletePayload!
"""Create a new ip block"""
createIPBlock(
"""Name of the ip block"""
input: CreateIPBlockInput!
): IPBlockCreatePayload!
"""Update an existing ip block"""
updateIPBlock(
"""ID of the ip block"""
id: ID!
"""Name of the ip block"""
input: UpdateIPBlockInput!
): IPBlockUpdatePayload!
"""Delete an existing ip block"""
deleteIPBlock(
"""ID of the ip block"""
id: ID!
): IPBlockDeletePayload!
"""Create a new ip block type"""
createIPBlockType(
"""Name of the ip block type"""
input: CreateIPBlockTypeInput!
): IPBlockTypeCreatePayload!
"""Update an existing ip block type"""
updateIPBlockType(
"""ID of the ip block type"""
id: ID!
"""Name of the ip block type"""
input: UpdateIPBlockTypeInput!
): IPBlockTypeUpdatePayload!
"""Delete an existing ip block type"""
deleteIPBlockType(
"""ID of the ip block type"""
id: ID!
): IPBlockTypeDeletePayload!
}
"""
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 {
"""Look up ip address by ID"""
ipAddress(
"""ID of the ip address"""
id: ID!
): IPAddress!
"""Look up ip block by ID"""
ipBlock(
"""ID of the ip block"""
id: ID!
): IPBlock!
"""Look up ip block type by ID"""
ipBlockType(
"""ID of the ip block type"""
id: ID!
): IPBlockType!
_entities(representations: [_Any!]!): [_Entity]!
_service: _Service!
}
type ResourceOwner @key(fields: "id") @interfaceObject {
id: ID!
ipBlockType(
"""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 IPBlockTypes returned from the connection."""
orderBy: IPBlockTypeOrder
"""Filtering options for IPBlockTypes returned from the connection."""
where: IPBlockTypeWhereInput
): IPBlockTypeConnection!
}
"""The builtin Time type"""
scalar Time
"""Update an existing ip address type node."""
input UpdateIPAddressInput {
"""The ip address."""
ip: String
"""Reserve the IP without it being assigned."""
reserved: Boolean
}
"""Update an existing ip block type node."""
input UpdateIPBlockInput {
"""The prefix of the ip block."""
prefix: String
"""Allow carving this block into smaller subnets."""
allowAutoSubnet: Boolean
"""Allow automatically assigning IPs directly from this block."""
allowAutoAllocate: Boolean
}
"""Update an existing ip block type node."""
input UpdateIPBlockTypeInput {
"""The name of the ip block type."""
name: String
}
scalar _Any
union _Entity = IPAddress | IPAddressable | IPBlock | IPBlockType | ResourceOwner
type _Service {
sdl: String
}
extend schema
@link(
url: "https://specs.apollo.dev/federation/v2.3"
import: [
"@key",
"@interfaceObject",
"@shareable",
"@inaccessible",
"@override",
"@provides",
"@requires",
"@tag"
]
)