Skip to content

Commit

Permalink
chore!: remove pageInfo from getBalances GraphQl operations (#3652)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torres-ssf authored Jan 31, 2025
1 parent 43dc5ee commit 4428556
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/big-dragons-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": minor
---

chore!: remove `pageInfo` from `getBalances` GraphQl operations
3 changes: 0 additions & 3 deletions packages/account/src/providers/operations.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,6 @@ query getBalances(
first: $first
last: $last
) {
pageInfo {
...pageInfoFragment
}
edges {
node {
assetId
Expand Down
19 changes: 19 additions & 0 deletions packages/account/src/providers/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2487,4 +2487,23 @@ describe('Provider', () => {

vi.restoreAllMocks();
});

it('should ensures getBalances query does not returns pageInfo', async () => {
using launched = await setupTestProviderAndWallets();
const {
provider,
wallets: [wallet],
} = launched;

const { balances } = await provider.operations.getBalances({
first: 100,
filter: { owner: wallet.address.toB256() },
});

const keys = Object.keys(balances);

expect(keys.includes('edges')).toBeTruthy();

expect(keys.includes('pageInfo')).toBeFalsy();
});
});

0 comments on commit 4428556

Please sign in to comment.