@@ -71,6 +71,48 @@ public async Task DeleteTenantAsync(string id, string partitionKey, Cancellation
7171 await MutationAsync < object > ( mutation , variables , "deleteTenant" , ct ) ;
7272 }
7373
74+ public async Task < Cell > CreateCellAsync ( Cell cell , CancellationToken ct = default )
75+ {
76+ var mutation = @"mutation($input: CreateCellInput!) { createCell(input: $input) { id region availabilityZone status capacityUsed capacityTotal } }" ;
77+ var variables = new { input = new { id = cell . Id , pk = cell . Id , region = cell . Region , availabilityZone = cell . AvailabilityZone , status = cell . Status , capacityUsed = cell . CapacityUsed , capacityTotal = cell . CapacityTotal } } ;
78+ return await MutationAsync < Cell > ( mutation , variables , "createCell" , ct ) ;
79+ }
80+
81+ public async Task < Cell > UpdateCellAsync ( Cell cell , CancellationToken ct = default )
82+ {
83+ var mutation = @"mutation($id: ID!, $input: UpdateCellInput!) { updateCell(id: $id, input: $input) { id region availabilityZone status capacityUsed capacityTotal } }" ;
84+ var variables = new { id = cell . Id , input = new { region = cell . Region , availabilityZone = cell . AvailabilityZone , status = cell . Status , capacityUsed = cell . CapacityUsed , capacityTotal = cell . CapacityTotal } } ;
85+ return await MutationAsync < Cell > ( mutation , variables , "updateCell" , ct ) ;
86+ }
87+
88+ public async Task DeleteCellAsync ( string id , string partitionKey , CancellationToken ct = default )
89+ {
90+ var mutation = @"mutation($id: ID!, $pk: String!) { deleteCell(id: $id, partitionKeyValue: $pk) }" ;
91+ var variables = new { id , pk = partitionKey } ;
92+ await MutationAsync < object > ( mutation , variables , "deleteCell" , ct ) ;
93+ }
94+
95+ public async Task < Operation > CreateOperationAsync ( Operation op , CancellationToken ct = default )
96+ {
97+ var mutation = @"mutation($input: CreateOperationInput!) { createOperation(input: $input) { id tenantId type status createdAt } }" ;
98+ var variables = new { input = new { id = op . Id , pk = op . TenantId , tenantId = op . TenantId , type = op . Type , status = op . Status , createdAt = op . CreatedAt } } ;
99+ return await MutationAsync < Operation > ( mutation , variables , "createOperation" , ct ) ;
100+ }
101+
102+ public async Task < Operation > UpdateOperationAsync ( Operation op , CancellationToken ct = default )
103+ {
104+ var mutation = @"mutation($id: ID!, $input: UpdateOperationInput!) { updateOperation(id: $id, input: $input) { id tenantId type status createdAt } }" ;
105+ var variables = new { id = op . Id , input = new { tenantId = op . TenantId , type = op . Type , status = op . Status , createdAt = op . CreatedAt } } ;
106+ return await MutationAsync < Operation > ( mutation , variables , "updateOperation" , ct ) ;
107+ }
108+
109+ public async Task DeleteOperationAsync ( string id , string partitionKey , CancellationToken ct = default )
110+ {
111+ var mutation = @"mutation($id: ID!, $pk: String!) { deleteOperation(id: $id, partitionKeyValue: $pk) }" ;
112+ var variables = new { id , pk = partitionKey } ;
113+ await MutationAsync < object > ( mutation , variables , "deleteOperation" , ct ) ;
114+ }
115+
74116 private async Task < IReadOnlyList < T > > QueryAsync < T > ( string query , string rootField , CancellationToken ct )
75117 {
76118 var payload = new { query } ;
0 commit comments