Skip to content
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

chore!: optimize balance queries #3296

Merged
merged 6 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tame-gorillas-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": minor
---

chore!: optimize balance queries
danielbate marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 3 additions & 8 deletions packages/account/src/providers/operations.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,6 @@ fragment messageProofFragment on MessageProof {
data
}

fragment balanceFragment on Balance {
owner
amount
assetId
}

fragment TxParametersFragment on TxParameters {
version
maxInputs
Expand Down Expand Up @@ -782,7 +776,7 @@ query getContractBalance($contract: ContractId!, $asset: AssetId!) {

query getBalance($owner: Address!, $assetId: AssetId!) {
balance(owner: $owner, assetId: $assetId) {
...balanceFragment
amount
}
}

Expand Down Expand Up @@ -817,7 +811,8 @@ query getBalances(
}
edges {
node {
...balanceFragment
assetId
amount
}
}
}
Expand Down