Skip to content

easy refactor(graphql-alt): lock down visibility #21992

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 Apr 28, 2025

Description

Switch pub to pub(crate) or pub(super) where possible.

Test plan

CI

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 April 28, 2025 14:39
@amnn amnn self-assigned this Apr 28, 2025
Copy link

vercel bot commented Apr 28, 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 2:06pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview May 19, 2025 2:06pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview May 19, 2025 2:06pm

@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env April 28, 2025 14:39 — 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 refactors various modules in the GraphQL indexer by locking down public visibility to more restricted levels (pub(crate) or pub(super)). This change improves internal encapsulation and minimizes the exposed API surface.

  • Updated visibility modifiers for functions and struct fields across modules.
  • Adjusted several API types and configuration structures to be less publicly accessible.
  • Ensured consistency in visibility restrictions throughout the codebase.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/sui-indexer-alt-graphql/src/task/watermark.rs Restricted visibility of WatermarkTask methods.
crates/sui-indexer-alt-graphql/src/pagination.rs Reduced visibility of PageLimits struct fields.
crates/sui-indexer-alt-graphql/src/extensions/timeout.rs Limited TimeoutConfig field access.
crates/sui-indexer-alt-graphql/src/extensions/query_limits/payload.rs Adjusted Usage struct for query limits to be module-private.
crates/sui-indexer-alt-graphql/src/extensions/query_limits/output.rs Constrained Usage struct visibility for output nodes.
crates/sui-indexer-alt-graphql/src/extensions/query_limits/mod.rs Applied visibility changes to QueryLimitsConfig and its functions.
crates/sui-indexer-alt-graphql/src/extensions/query_limits/input.rs Modified Usage struct visibility for input limits.
crates/sui-indexer-alt-graphql/src/api/types/transaction_effects.rs Locked down TransactionEffects struct fields.
crates/sui-indexer-alt-graphql/src/api/types/transaction.rs Updated Transaction struct fields to a restricted scope.
crates/sui-indexer-alt-graphql/src/api/types/object.rs Reduced access to ObjectKey struct fields.
crates/sui-indexer-alt-graphql/src/api/scalars/cursor.rs Limited the JsonCursor::new function visibility.

@amnn amnn force-pushed the amnn/gql-get-pkg branch from 696d93f to ec294ec Compare April 28, 2025 15:18
@amnn amnn force-pushed the amnn/gql-get-pkg branch from ec294ec to f9df5e7 Compare April 28, 2025 15:49
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env April 28, 2025 15:49 — with GitHub Actions Inactive
@amnn amnn force-pushed the amnn/gql-get-pkg branch from f9df5e7 to ee81a06 Compare April 28, 2025 17:49
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env April 28, 2025 17:49 — with GitHub Actions Inactive
@amnn amnn mentioned this pull request Apr 28, 2025
7 tasks
@amnn amnn force-pushed the amnn/gql-get-pkg branch from ee81a06 to b7d88de Compare April 29, 2025 15:58
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env April 29, 2025 15:58 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env April 29, 2025 16:07 — with GitHub Actions Inactive
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 9, 2025 17:24 — with GitHub Actions Inactive
@amnn amnn force-pushed the amnn/gql-get-pkg branch from 21d6449 to caf3ac7 Compare May 15, 2025 13:28
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 15, 2025 13:28 — with GitHub Actions Inactive
@amnn amnn force-pushed the amnn/gql-get-pkg branch from caf3ac7 to 18eb8f6 Compare May 17, 2025 12:50
@amnn amnn temporarily deployed to sui-typescript-aws-kms-test-env May 17, 2025 12:50 — with GitHub Actions Inactive
@amnn amnn requested a review from mystenmark as a code owner May 19, 2025 13:45
@amnn amnn merged commit 4e311d0 into amnn/gql-get-pkg May 19, 2025
82 of 99 checks passed
@amnn amnn force-pushed the amnn/gql-get-pkg branch from 18eb8f6 to 4e311d0 Compare May 19, 2025 13:45
@amnn amnn deleted the amnn/gql-vis 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: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