forked from wandb/weave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wb_schema.gql
715 lines (625 loc) · 14.1 KB
/
wb_schema.gql
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
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# This file is a hand-selected subset of the W&B GQL spec that is used by weave python.
# On the backend, it's used by gql_to_weave.py to convert GQL queries to weave types.
# On the frontend, it's used for autogenerating TypeScript definitions for GQL queries.
# If you need to support a new GQL op in weave, you must add the relevant type definitions here.
schema {
query: Query
mutation: Mutation
}
directive @audit on FIELD_DEFINITION
directive @constraints(
min: Int
max: Int
pattern: String
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
directive @accessibleIf(
cond: String
restrictEvenAdmins: Boolean
) on FIELD_DEFINITION
type Query {
user(id: ID, userName: String): User
entity(name: String, login: Boolean): Entity
viewer(entityName: String): User
users(
query: String
before: String
after: String
first: Int
last: Int
usernames: [String!]
ids: [ID!]
): UserConnection
project(name: String, entityName: String): Project
projects(
entityName: String
order: String
anonymous: Boolean
before: String
after: String
first: Int
last: Int
): ProjectConnection
entities(
order: String
before: String
after: String
first: Int
last: Int
): EntityConnection
view(id: ID!, type: String): View
views(ids: [ID!]!): ViewConnection
organizations(
ids: [ID!]
emailDomain: String
query: String
before: String
after: String
first: Int
last: Int
): OrganizationConnection!
organization(id: ID, name: String): Organization
artifact(id: ID!): Artifact
artifactCollection(id: ID!): ArtifactCollection
artifactSequence(id: ID!): ArtifactSequence
instance: WBInstance
repoInsightsPlotData(
plotName: String!
repoName: String!
filters: JSONString
order: String
groupKeys: [String!]
columns: [String!]
before: String
after: String
first: Int
last: Int
): RepoInsightsRowConnection
repo(id: ID!): Repo
}
input UpdateUserInput {
id: ID # null implies "self" -- only admins can edit others
primaryEmail: String
defaultEntity: String
defaultFramework: String # deprecated
photoUrl: String
code: String
name: String @constraints(max: 64)
userInfo: JSONString
hideTeamsFromPublic: Boolean
settingsVisited: Boolean
galleryVisited: Boolean
onboardingHidden: Boolean
private: Boolean
admin: Boolean
password: String
clientMutationId: String
}
type UpdateUserPayload {
user: User
clientMutationId: String
}
type Mutation {
updateUser(input: UpdateUserInput!): UpdateUserPayload @audit
deleteView(input: DeleteViewInput!): DeleteViewPayload
upsertView(input: UpsertViewInput!): UpsertViewPayload @audit
updateArtifactSequence(
input: UpdateArtifactSequenceInput!
): UpdateArtifactCollectionPayload
deleteArtifactSequence(
input: DeleteArtifactSequenceInput!
): DeleteArtifactCollectionPayload
}
scalar DateTime
scalar JSONString
scalar JSON
scalar Duration
scalar Int64
type WBInstance {
entities: [Entity!]!
views(first: Int): ViewConnection!
artifactSequences(first: Int): ArtifactSequenceConnection
projects(first: Int): ProjectConnection
}
interface Node {
id: ID!
}
type PageInfo {
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
endCursor: String
}
input TimeWindow {
start: DateTime!
end: DateTime!
}
type PublicImageUploadInfo {
uploadUrl: String!
imageUrl: String!
uploadHeaders: [String!]!
}
enum ArtifactCollectionType {
SEQUENCE
PORTFOLIO
}
input ProjectIdentifierInput {
Name: String
EntityName: String
}
type User implements Node {
id: ID!
name: String!
username: String
email: String @accessibleIf(cond: "viewerCanReadEmail")
photoUrl: String
deletedAt: DateTime
teams(before: String, after: String, first: Int, last: Int): EntityConnection
}
type UserConnection {
pageInfo: PageInfo!
edges: [UserEdge!]!
}
type UserEdge {
node: User
cursor: String!
}
union Initiator = Run | User
type Project implements Node {
createdAt: DateTime!
updatedAt: DateTime
id: ID!
name: String!
runs(filters: JSONString, order: String, first: Int): RunConnection
entity: Entity!
# groups(fields: [String], level: String, filters: JSONString, order: String, historyFields: [String], before: String, after: String, first: Int, last: Int): GroupConnection
user: User
run(name: String!): Run
artifactType(name: String!): ArtifactType
artifactTypes(first: Int): ArtifactTypeConnection!
artifact(name: String!): Artifact
artifactCollection(name: String!): ArtifactCollection
artifactCollections(first: Int): ArtifactCollectionConnection
runQueues: [RunQueue!]!
}
type RunQueue {
id: ID!
}
type ProjectConnection {
pageInfo: PageInfo!
edges: [ProjectEdge!]!
}
type ProjectEdge {
node: Project
cursor: String!
}
type ParquetHistory {
liveData: [JSON!]!
parquetUrls: [String!]!
}
type Run implements Node {
createdAt: DateTime!
name: String!
jobType: String
config(keys: [String!]): JSONString
summaryMetrics(keys: [String!]): JSONString
displayName: String
heartbeatAt: DateTime
user: User
project: Project
id: ID!
outputArtifacts(first: Int): ArtifactConnection
inputArtifacts(first: Int): InputArtifactConnection
history(minStep: Int64, maxStep: Int64): [String!]!
historyLineCount: Int
historyKeys: JSON
computeSeconds: Duration!
parquetHistory(liveKeys: [String!]!): ParquetHistory!
}
type RunConnection {
totalCount: Int!
pageInfo: PageInfo!
edges: [RunEdge!]!
}
type RunEdge {
node: Run!
cursor: String!
}
type RepoInsightsRowConnection {
totalCount: Int!
pageInfo: PageInfo!
schema: JSON!
edges: [RowEdge!]!
isNormalizedUserCount: Boolean!
}
type RowConnection {
totalCount: Int!
pageInfo: PageInfo!
schema: JSON!
edges: [RowEdge!]!
}
type RowEdge {
node: RowType
}
type RowType {
row: JSON!
}
type Entity implements Node {
id: ID!
name: String!
isTeam: Boolean!
projects(
before: String
after: String
first: Int
last: Int
order: String
): ProjectConnection
organization: Organization
artifactCollections(
before: String
after: String
first: Int
last: Int
order: String
filters: JSONString
collectionTypes: [ArtifactCollectionType!]
): ArtifactCollectionConnection
}
type EntityConnection {
edges: [EntityEdge!]!
}
type EntityEdge {
node: Entity
cursor: String!
}
type RepoConnection {
edges: [RepoEdge!]!
}
type RepoEdge {
node: Repo
cursor: String!
}
type Repo implements Node {
id: ID!
entity: Entity!
displayName: String!
}
enum OrgType {
ORGANIZATION
PERSONAL
}
type OrganizationConnection {
pageInfo: PageInfo!
edges: [OrganizationEdge!]!
}
type OrganizationEdge {
node: Organization!
cursor: String!
}
type Organization implements Node {
id: ID!
name: String!
views(first: Int): ViewConnection!
artifactCollections(first: Int): ArtifactCollectionConnection
projects(first: Int): ProjectConnection
}
type ArtifactTypeConnection {
pageInfo: PageInfo!
edges: [ArtifactTypeEdge!]!
}
type ArtifactTypeEdge {
node: ArtifactType
cursor: String!
}
type ArtifactType {
id: ID!
name: String!
project: Project!
artifactCollections(first: Int): ArtifactCollectionConnection
artifact(name: String!): Artifact
}
type ArtifactCollectionConnection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArtifactCollectionEdge!]!
}
type ArtifactCollectionEdge {
node: ArtifactCollection
cursor: String!
}
interface ArtifactCollection {
id: ID!
name: String!
description: String
createdAt: DateTime!
project: Project!
defaultArtifactType: ArtifactType!
artifacts(first: Int): VersionedArtifactConnection
aliases(first: Int): ArtifactAliasConnection!
artifactMemberships(first: Int): ArtifactCollectionMembershipConnection!
artifactMembership(aliasName: String!): ArtifactCollectionMembership
tags: TagConnection!
}
type TagConnection {
pageInfo: PageInfo!
edges: [TagEdge!]!
}
type TagEdge {
node: Tag!
cursor: String!
}
type Tag {
id: ID!
name: String!
attributes: JSONString!
tagCategoryName: String!
}
type ArtifactSequenceConnection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArtifactSequenceEdge!]!
}
type ArtifactSequenceEdge {
node: ArtifactSequence
cursor: String!
}
type ArtifactSequence implements ArtifactCollection {
id: ID!
name: String!
description: String
createdAt: DateTime!
project: Project!
defaultArtifactType: ArtifactType!
artifacts(first: Int): VersionedArtifactConnection!
aliases(first: Int): ArtifactAliasConnection!
artifactMemberships(first: Int): ArtifactCollectionMembershipConnection!
# aliasName can be an alias (latest, v0, custom_alias), commitHash, or digest
artifactMembership(aliasName: String!): ArtifactCollectionMembership
}
type ArtifactPortfolio implements ArtifactCollection {
id: ID!
name: String!
description: String
createdAt: DateTime!
project: Project!
defaultArtifactType: ArtifactType!
artifacts(first: Int): VersionedArtifactConnection!
aliases(first: Int): ArtifactAliasConnection!
artifactMemberships(first: Int): ArtifactCollectionMembershipConnection!
artifactMembership(aliasName: String!): ArtifactCollectionMembership
}
type ArtifactCollectionMembershipConnection {
pageInfo: PageInfo!
edges: [ArtifactCollectionMembershipEdge!]!
}
type ArtifactCollectionMembershipEdge {
node: ArtifactCollectionMembership
cursor: String!
}
type ArtifactCollectionMembership {
id: ID!
artifactCollection: ArtifactCollection
artifact: Artifact
createdAt: DateTime!
commitHash: String
versionIndex: Int
aliases: [ArtifactAlias!]!
}
interface ArtifactConnectionType {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArtifactEdgeType!]!
}
type ArtifactConnection implements ArtifactConnectionType {
totalCount: Int!
pageInfo: PageInfo!
edges: [ArtifactEdge!]!
}
type VersionedArtifactConnection implements ArtifactConnectionType {
totalCount: Int!
pageInfo: PageInfo!
edges: [VersionedArtifactEdge!]!
}
type InputArtifactConnection implements ArtifactConnectionType {
totalCount: Int!
pageInfo: PageInfo!
edges: [InputArtifactEdge!]!
}
interface ArtifactEdgeType {
node: Artifact
cursor: String!
}
type ArtifactEdge implements ArtifactEdgeType {
node: Artifact
cursor: String!
}
type VersionedArtifactEdge implements ArtifactEdgeType {
node: Artifact!
version: String!
cursor: String!
}
type InputArtifactEdge implements ArtifactEdgeType {
node: Artifact
cursor: String!
usedAs: [String!]!
}
enum ArtifactState {
PENDING
COMMITTED
DELETED
}
type ArtifactAliasConnection {
pageInfo: PageInfo!
edges: [ArtifactAliasEdge!]!
}
type ArtifactAliasEdge {
node: ArtifactAlias
cursor: String!
}
type ArtifactAlias {
id: ID!
artifact: Artifact
alias: String!
artifactCollection: ArtifactCollection
artifactCollectionName: String!
}
type Artifact {
id: ID!
digest: String!
description: String
commitHash(artifactCollectionName: String): String
versionIndex(artifactCollectionName: String): Int
aliases(artifactCollectionName: String): [ArtifactAlias!]!
labels: JSONString
metadata: JSONString
state: ArtifactState!
size: Int64!
storageBytes: Int64!
fileCount: Int64!
artifactType: ArtifactType!
artifactCollections: ArtifactCollectionConnection!
artifactMemberships: ArtifactCollectionMembershipConnection!
artifactSequence: ArtifactSequence!
createdAt: DateTime!
updatedAt: DateTime
createdBy: Initiator
usedCount: Int!
usedBy(
filters: JSONString
order: String
before: String
after: String
first: Int
last: Int
): RunConnection!
currentManifest: ArtifactManifest
historyStep: Int64
ttlDurationSeconds: Int64!
}
type ArtifactManifestConnection {
pageInfo: PageInfo!
edges: [ArtifactManifestEdge!]!
}
type ArtifactManifestEdge {
node: ArtifactManifest
cursor: String!
}
enum ArtifactManifestType {
FULL
PATCH
INCREMENTAL
}
type ArtifactManifest {
id: ID!
type: ArtifactManifestType!
createdAt: DateTime!
digest: String!
artifact: Artifact!
}
type ImageUrl {
url: String
publicUrl: String
path: String
}
enum ViewSource {
WANDB_UI
WANDB_UI_SHARE_PANEL
WANDB_SDK
WEAVE_UI
}
type View implements Node {
createdAt: DateTime!
updatedAt: DateTime
updatedBy: User
id: ID!
name: String
displayName: String
type: String
userId: Int
projectId: Int
description: String
imageUploadUrl(name: String!): ImageUrl!
uploadHeaders: [String!]!
previewUrl: String
coverUrl: String
spec: JSONString
user: User
project: Project
entity: Entity
entityName: String!
projectName: String!
starCount(from: DateTime, to: DateTime): Int!
starred: Boolean
children: ViewConnection
parentId: ID
locked: Boolean!
viewCount: Int!
showcasedAt: DateTime
createdUsing: ViewSource!
}
type ViewConnection {
totalCount: Int!
pageInfo: PageInfo!
edges: [ViewEdge!]!
}
type ViewEdge {
node: View
cursor: String!
}
input DeleteViewInput {
id: ID
deleteDrafts: Boolean = false
clientMutationId: String
}
type DeleteViewPayload {
success: Boolean
pendingDrafts: Boolean
clientMutationId: String
}
input UpsertViewInput {
id: ID
entityName: String
projectName: String
name: String @constraints(max: 128)
displayName: String @constraints(max: 128)
description: String
type: String
spec: String
parentId: ID
locked: Boolean
previewUrl: String @constraints(max: 256)
coverUrl: String @constraints(max: 256)
clientMutationId: String
showcasedAt: DateTime
createdUsing: ViewSource
}
type UpsertViewPayload {
view: View
inserted: Boolean
clientMutationId: String
}
input UpdateArtifactSequenceInput {
artifactSequenceID: ID!
name: String @constraints(max: 128)
description: String
clientMutationId: String
}
type UpdateArtifactCollectionPayload {
artifactCollection: ArtifactCollection!
clientMutationId: String
}
input DeleteArtifactSequenceInput {
artifactSequenceID: ID!
clientMutationId: String
}
type DeleteArtifactCollectionPayload {
artifactCollection: ArtifactCollection!
clientMutationId: String
}
interface Error {
message: String!
}
enum ErrorSeverity {
WARN
ERROR
}