Skip to content

Commit

Permalink
Updated all pagination queries to work with the Stream instead of `…
Browse files Browse the repository at this point in the history
…Iterator` (#2337)

This change updates all pagination queries to work with the async stream
instead of the sync iterator.

It is preparation for the next PR to move the fetching of transactions,
coins, and messages into a separate thread and await the return of the
result from this thread.

Also, this PR limits the maximum number of requested coins from the
`coins_to_spend` query to `max_inputs`.

## Checklist
- [x] Breaking changes are clearly marked as such in the PR description
and changelog

### Before requesting review
- [x] I have reviewed the code myself
  • Loading branch information
xgreenx authored Oct 14, 2024
1 parent ab5e940 commit 7cb4231
Show file tree
Hide file tree
Showing 21 changed files with 471 additions and 349 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

- [2334](https://github.com/FuelLabs/fuel-core/pull/2334): Prepare the GraphQL service for the switching to `async` methods.
- [2337](https://github.com/FuelLabs/fuel-core/pull/2337): Updated all pagination queries to work with the async stream instead of the sync iterator.

#### Breaking
- [2337](https://github.com/FuelLabs/fuel-core/pull/2337): The maximum number of processed coins from the `coins_to_spend` query is limited to `max_inputs`.

## [Version 0.39.0]

Expand Down
2 changes: 1 addition & 1 deletion crates/client/assets/schema.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ type Query {
"""
owner: Address!,
"""
The list of requested assets` coins with asset ids, `target` amount the user wants to reach, and the `max` number of coins in the selection. Several entries with the same asset id are not allowed.
The list of requested assets` coins with asset ids, `target` amount the user wants to reach, and the `max` number of coins in the selection. Several entries with the same asset id are not allowed. The result can't contain more coins than `max_inputs`.
"""
queryPerAsset: [SpendQueryElementInput!]!,
"""
Expand Down
Loading

0 comments on commit 7cb4231

Please sign in to comment.