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

Updated all pagination queries to work with the Stream instead of Iterator #2337

Merged

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Oct 12, 2024

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

  • Breaking changes are clearly marked as such in the PR description and changelog

Before requesting review

  • I have reviewed the code myself

@xgreenx xgreenx self-assigned this Oct 12, 2024
@xgreenx xgreenx requested a review from a team October 12, 2024 15:45
Copy link
Member

@rymnc rymnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few comments and suggestions :)

crates/fuel-core/src/graphql_api/database.rs Show resolved Hide resolved
crates/fuel-core/src/graphql_api/database.rs Show resolved Hide resolved
crates/fuel-core/src/query/balance.rs Show resolved Hide resolved
crates/fuel-core/src/query/balance.rs Show resolved Hide resolved
crates/storage/src/kv_store.rs Show resolved Hide resolved
@xgreenx xgreenx merged commit 7cb4231 into feature/prepare-graphql-for-async Oct 14, 2024
38 checks passed
@xgreenx xgreenx deleted the feature/async-pagination-queries branch October 14, 2024 06:37
@xgreenx xgreenx restored the feature/async-pagination-queries branch October 14, 2024 06:37
xgreenx added a commit that referenced this pull request Oct 14, 2024
…Iterator` (#2341)

Accidentally merged #2337.
Reopen it again in this PR

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

---------

Co-authored-by: Mårten Blankfors <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants