sui
sui copied to clipboard
[11/n][enums/Sui] Graphql and json-rpc support for enums
Description
Adds support for Move enums to both graphql and json-rpc. This adds a couple different things. At a high level:
- Adds an interface
IMoveDatatype
that allows for access to common fields between both Move structs and enums (e.g., name, type parameters, abilities). - Adds methods
datatype(name: String)
anddatatypes
toMovePackage
that returns datatypes. Note that datatype names are still sorted in the same way as before in pagination (in particular: it will not be paginated as all structs, then all enums or vis-versa, but paginated in sorted order on the datatype names). This is due to the waydatatypes
is implemented in the package resolver. - Adds
MoveEnum
as a GraphQL type and associated machinery.
This PR is meant to be a logically-reviewable portion but is not land-able on its own. It must be merged in with the changes in the rest of this stack to be landed.
Stack:
- #17245
- #17246
- #17247
- #17248
- #17249
- #17250 << You are here
- #17251
Test plan
Added new tests in this PR for the new features.
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] Indexer:
- [X] JSON-RPC:
- [X] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
sui-core | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 24, 2024 5:47pm |
sui-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 24, 2024 5:47pm |
3 Ignored Deployments
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
multisig-toolkit | ⬜️ Ignored (Inspect) | Visit Preview | May 24, 2024 5:47pm | |
sui-kiosk | ⬜️ Ignored (Inspect) | Visit Preview | May 24, 2024 5:47pm | |
sui-typescript-docs | ⬜️ Ignored (Inspect) | Visit Preview | May 24, 2024 5:47pm |