@@ -135,12 +135,32 @@ class ModelDeployment(Node):
135
135
metadata : ModelDeploymentMetadata
136
136
network_access : ModelDeploymentNetworkAccess
137
137
revision : Optional [ModelRevision ] = None
138
- revision_history : ModelRevisionConnection
139
138
scaling_rule : ScalingRule
140
139
replica_state : ReplicaState
141
140
default_deployment_strategy : DeploymentStrategy
142
141
created_user : User
143
142
143
+ @strawberry .field
144
+ async def revision_history (
145
+ self ,
146
+ info : Info [StrawberryGQLContext ],
147
+ filter : Optional [ReplicaFilter ] = None ,
148
+ order_by : Optional [list [ReplicaOrderBy ]] = None ,
149
+ before : Optional [str ] = None ,
150
+ after : Optional [str ] = None ,
151
+ first : Optional [int ] = None ,
152
+ last : Optional [int ] = None ,
153
+ limit : Optional [int ] = None ,
154
+ offset : Optional [int ] = None ,
155
+ ) -> ModelRevisionConnection :
156
+ return ModelRevisionConnection (
157
+ count = 2 ,
158
+ edges = [
159
+ ModelRevisionEdge (node = mock_model_revision_1 , cursor = "rev-cursor-1" ),
160
+ ModelRevisionEdge (node = mock_model_revision_2 , cursor = "rev-cursor-2" ),
161
+ ],
162
+ )
163
+
144
164
145
165
# Filter Types
146
166
@strawberry .input (description = "Added in 25.13.0" )
@@ -273,19 +293,6 @@ class DeleteModelDeploymentInput:
273
293
),
274
294
),
275
295
revision = mock_model_revision_1 ,
276
- revision_history = ModelRevisionConnection (
277
- count = 2 ,
278
- edges = [
279
- ModelRevisionEdge (node = mock_model_revision_1 , cursor = "rev-cursor-1" ),
280
- ModelRevisionEdge (node = mock_model_revision_2 , cursor = "rev-cursor-2" ),
281
- ],
282
- page_info = PageInfo (
283
- has_next_page = False ,
284
- has_previous_page = False ,
285
- start_cursor = "rev-cursor-1" ,
286
- end_cursor = "rev-cursor-2" ,
287
- ),
288
- ),
289
296
scaling_rule = ScalingRule (auto_scaling_rules = [mock_scaling_rule_1 , mock_scaling_rule_2 ]),
290
297
replica_state = ReplicaState (
291
298
desired_replica_count = 3 ,
@@ -327,18 +334,6 @@ class DeleteModelDeploymentInput:
327
334
),
328
335
),
329
336
revision = mock_model_revision_3 ,
330
- revision_history = ModelRevisionConnection (
331
- count = 1 ,
332
- edges = [
333
- ModelRevisionEdge (node = mock_model_revision_3 , cursor = "rev-cursor-3" ),
334
- ],
335
- page_info = PageInfo (
336
- has_next_page = False ,
337
- has_previous_page = False ,
338
- start_cursor = "rev-cursor-3" ,
339
- end_cursor = "rev-cursor-3" ,
340
- ),
341
- ),
342
337
scaling_rule = ScalingRule (auto_scaling_rules = []),
343
338
replica_state = ReplicaState (
344
339
desired_replica_count = 1 ,
@@ -382,16 +377,6 @@ class DeleteModelDeploymentInput:
382
377
),
383
378
),
384
379
revision = None ,
385
- revision_history = ModelRevisionConnection (
386
- count = 0 ,
387
- edges = [],
388
- page_info = PageInfo (
389
- has_next_page = False ,
390
- has_previous_page = False ,
391
- start_cursor = None ,
392
- end_cursor = None ,
393
- ),
394
- ),
395
380
scaling_rule = ScalingRule (auto_scaling_rules = []),
396
381
replica_state = ReplicaState (
397
382
desired_replica_count = 0 ,
0 commit comments