-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GraphQL/MovePackage] Query by ID and version
## Description Implement `Query.package` and `MovePackage.atVersion` to query a package at a specific version, using the new fields added to the `packages` table, exposed via some new data loaders. ## Test plan New transactional tests: ``` sui$ cargo nextest run -p sui-graphql-e2e-tests \ --features pg_integration \ -- packages/versioning ```
- Loading branch information
Showing
9 changed files
with
714 additions
and
28 deletions.
There are no files selected for viewing
310 changes: 310 additions & 0 deletions
310
crates/sui-graphql-e2e-tests/tests/packages/versioning.exp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,310 @@ | ||
processed 9 tasks | ||
|
||
init: | ||
A: object(0,0) | ||
|
||
task 1 'publish'. lines 6-9: | ||
created: object(1,0), object(1,1) | ||
mutated: object(0,0) | ||
gas summary: computation_cost: 1000000, storage_cost: 5076800, storage_rebate: 0, non_refundable_storage_fee: 0 | ||
|
||
task 2 'upgrade'. lines 11-15: | ||
created: object(2,0) | ||
mutated: object(0,0), object(1,1) | ||
gas summary: computation_cost: 1000000, storage_cost: 5251600, storage_rebate: 2595780, non_refundable_storage_fee: 26220 | ||
|
||
task 3 'upgrade'. lines 17-22: | ||
created: object(3,0) | ||
mutated: object(0,0), object(1,1) | ||
gas summary: computation_cost: 1000000, storage_cost: 5426400, storage_rebate: 2595780, non_refundable_storage_fee: 26220 | ||
|
||
task 4 'create-checkpoint'. lines 24-24: | ||
Checkpoint created: 1 | ||
|
||
task 5 'run-graphql'. lines 26-45: | ||
Response: { | ||
"data": { | ||
"v1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task 6 'run-graphql'. lines 47-84: | ||
Response: { | ||
"data": { | ||
"v1_from_p1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v1_from_p2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2_from_p0": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2_from_p2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3_from_p0": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3_from_p1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task 7 'run-graphql'. lines 86-141: | ||
Response: { | ||
"data": { | ||
"v1": { | ||
"v1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"v2": { | ||
"v1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"v3": { | ||
"v1": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v2": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"v3": { | ||
"module": { | ||
"functions": { | ||
"nodes": [ | ||
{ | ||
"name": "f" | ||
}, | ||
{ | ||
"name": "g" | ||
}, | ||
{ | ||
"name": "h" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
task 8 'run-graphql'. lines 143-171: | ||
Response: { | ||
"data": { | ||
"v0": null, | ||
"v1": { | ||
"v0": null, | ||
"v4": null | ||
}, | ||
"v4": null | ||
} | ||
} |
Oops, something went wrong.