Skip to content

graphql-alt: IObject.objectAt, MovePackage.packageAt #22087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 0 commits into from
May 19, 2025
Merged

Conversation

amnn
Copy link
Contributor

@amnn amnn commented May 9, 2025

Description

Support fetching a different version of an existing object or package. This is mostly helpful if you have fetched an object or package in response to some nested query, and then want to modify the version of it you are looking at.

Test plan

New E2E tests:

sui$ cargo nextest run         \
  -p sui-indexer-alt-e2e-tests \
  -- graphql/objects/object_at \
     graphql/packages/package_at

Stack


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:

@amnn amnn requested review from emmazzz, wlmyng and Copilot May 9, 2025 14:23
@amnn amnn self-assigned this May 9, 2025
Copy link

vercel bot commented May 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 1:55pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 19, 2025 1:55pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 19, 2025 1:55pm

@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 9, 2025 14:24 — with GitHub Actions Inactive
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for fetching objects and packages at alternative versions or checkpoints to enable updates on previously fetched data. Key changes include new GraphQL fields (objectAt and packageAt) in multiple schema files, corresponding resolver functions in the Rust API, and updated end-to-end tests validating the new behavior.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/sui-indexer-alt-graphql/staging.graphql Added new field definitions for objectAt and packageAt with descriptions
crates/sui-indexer-alt-graphql/src/api/types/object.rs Added resolver function for object_at
crates/sui-indexer-alt-graphql/src/api/types/move_package.rs Added resolver functions for object_at and package_at
crates/sui-indexer-alt-graphql/schema.graphql Added new field definitions for objectAt and packageAt in the core schema
Tests Updated snapshots and Move test scripts to validate the alternative version fetching

@amnn amnn changed the title Amnn/gql at graphql-alt: IObject.objectAt, MovePackage.packageAt May 9, 2025
@amnn amnn force-pushed the amnn/gql-obj-vs branch from 0d7bb21 to 616d44c Compare May 9, 2025 17:24
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 9, 2025 17:25 — with GitHub Actions Inactive
@amnn amnn requested a review from mystenmark as a code owner May 19, 2025 13:45
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn merged commit 4e311d0 into amnn/gql-obj-vs May 19, 2025
31 of 38 checks passed
@amnn amnn force-pushed the amnn/gql-obj-vs branch from e1efcea to 4e311d0 Compare May 19, 2025 13:45
@amnn amnn deleted the amnn/gql-at branch May 19, 2025 13:45
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:45 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:46 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 19, 2025 13:47 — with GitHub Actions Inactive
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