Skip to content

Commit

Permalink
[graphql][cherry-pick] need to add object_status=0 to use partial ind…
Browse files Browse the repository at this point in the history
…exes (#20176) (#20181)

## Description 

cherry pick

## Test plan 

How did you test the new or updated feature?

---

## 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: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
wlmyng authored Nov 5, 2024
1 parent 7839b95 commit b15a076
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/sui-graphql-rpc/src/types/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ fn balance_query(
/// Applies the filtering criteria for balances to the input `RawQuery` and returns a new
/// `RawQuery`.
fn filter(mut query: RawQuery, owner: SuiAddress, coin_type: Option<TypeTag>) -> RawQuery {
query = filter!(query, "coin_type IS NOT NULL");
query = filter!(query, "coin_type IS NOT NULL AND object_status = 0");

query = filter!(
query,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-graphql-rpc/src/types/coin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ fn apply_filter(mut query: RawQuery, coin_type: &TypeTag, owner: Option<SuiAddre

query = filter!(
query,
"coin_type IS NOT NULL AND coin_type = {}",
"coin_type IS NOT NULL AND coin_type = {} AND object_status = 0",
coin_type.to_canonical_display(/* with_prefix */ true)
);

Expand Down

0 comments on commit b15a076

Please sign in to comment.