-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
There was a problem hiding this 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. |
Description
Switch
pub
topub(crate)
orpub(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.