Skip to content

graphql: MoveValue.asVector#25479

Merged
amnn merged 2 commits intomainfrom
amnn/gql-as-vector
Mar 3, 2026
Merged

graphql: MoveValue.asVector#25479
amnn merged 2 commits intomainfrom
amnn/gql-as-vector

Conversation

@amnn
Copy link
Copy Markdown
Contributor

@amnn amnn commented Feb 16, 2026

Description

Add the ability to paginate over a vector of Move Values in the GraphQL API. This addresses a gap that made it more difficult to work with vector, VecMap, and VecSetin GraphQL, compared to working with dynamic field based types likeTableandBag`.

Test plan

New unit tests:

$ cargo nextest run -p sui-indexer-alt-graphql

New E2E tests:

$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  --test transactional_tests                     \
  -- graphql/move_value/as_vector

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):
  • gRPC:
  • JSON-RPC:
  • GraphQL: Introduce MoveValue.asVector for paginating through vectors of Move Values.
  • CLI:
  • Rust SDK:
  • Indexing Framework:

amnn added 2 commits February 16, 2026 17:12
## Description

Factor out a helper for calculating the relevant range of indices based
on cursors/page information. This was previously part of
`paginate_indices`, but will be used in the implementation of
`MoveValue.asVector` as well, so it makes sense to have it as a separate
function.

## Test plan

New unit tests:

```
$ cargo nextest run -p sui-indexer-alt-graphql
```
## Description

Add the ability to paginate over a vector of Move Values in the GraphQL
API. This addresses a gap that made it more difficult to work with
`vector`, `VecMap, and `VecSet` in GraphQL, compared to working with
dynamic field based types like `Table` and `Bag`.

## Test plan

New E2E tests:

```
$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  --test transactional_tests                     \
  -- graphql/move_value/as_vector
```
@amnn amnn requested a review from manolisliolios February 16, 2026 17:13
@amnn amnn self-assigned this Feb 16, 2026
@amnn amnn requested a review from a team as a code owner February 16, 2026 17:13
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env February 16, 2026 17:13 — with GitHub Actions Inactive
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sui-docs Ready Ready Preview, Comment Feb 16, 2026 5:14pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
multisig-toolkit Ignored Ignored Feb 16, 2026 5:14pm
sui-kiosk Ignored Ignored Feb 16, 2026 5:14pm

Request Review

@amnn amnn changed the title Amnn/gql as vector graphql: MoveValue.asVector Feb 16, 2026
@amnn amnn mentioned this pull request Feb 16, 2026
8 tasks
@amnn amnn merged commit 7ebef32 into main Mar 3, 2026
60 of 61 checks passed
@amnn amnn deleted the amnn/gql-as-vector branch March 3, 2026 21:12
amnn added a commit that referenced this pull request Mar 4, 2026
## Description

Give users the ability to refer directly to the value being displayed,
using `$self`. This makes it possiblet to write expressions where the
`$self` is used as part of a dynamic field key, rather than part of the
parent that that dynamic field is being fetched from. E.g. to use the
value as a key to fetch from a registry, `@REGISTRY->[$self]`.

## Test plan

New unit tests:

```
$ cargo nextest run -p sui-display
```

## Stack

- #25479 

---

## 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): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
jessiemongeon1 pushed a commit to jessiemongeon1/sui that referenced this pull request Mar 5, 2026
Add the ability to paginate over a vector of Move Values in the GraphQL
API. This addresses a gap that made it more difficult to work with
`vector`, `VecMap, and `VecSet` in GraphQL, compared to working with
dynamic field based types like `Table` and `Bag`.

New unit tests:

```
$ cargo nextest run -p sui-indexer-alt-graphql
```

New E2E tests:

```
$ cargo nextest run -p sui-indexer-alt-e2e-tests \
  --test transactional_tests                     \
  -- graphql/move_value/as_vector
```

---

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):
- [ ] gRPC:
- [ ] JSON-RPC:
- [x] GraphQL: Introduce `MoveValue.asVector` for paginating through
vectors of Move Values.
- [ ] CLI:
- [ ] Rust SDK:
- [ ] Indexing Framework:
jessiemongeon1 pushed a commit to jessiemongeon1/sui that referenced this pull request Mar 5, 2026
## Description

Give users the ability to refer directly to the value being displayed,
using `$self`. This makes it possiblet to write expressions where the
`$self` is used as part of a dynamic field key, rather than part of the
parent that that dynamic field is being fetched from. E.g. to use the
value as a key to fetch from a registry, `@REGISTRY->[$self]`.

## Test plan

New unit tests:

```
$ cargo nextest run -p sui-display
```

## Stack

- MystenLabs#25479 

---

## 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): 
- [ ] gRPC:
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] Indexing Framework:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants