Feat/mirror node query api#145
Open
Aamir377300 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Aamir377300 <belalaamirkhan@gmail.com>
Signed-off-by: Aamir377300 <belalaamirkhan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue solve #140
Description
I worked on introducing a query-object-based API for the Mirror Node repositories to help avoid the growing number of repository method combinations as more filters get added over time.
Main Changes
For transactions, I added a TransactionQuery model that supports combinations of: Account, Transaction Type, Result, Limit, Order and Timestamp filters
I also added:
to TransactionRepository.
Additional Improvements(not mention in issue #140)
While implementing the transaction query flow, I noticed a few related areas where the same pattern would likely be needed for consistency across the Mirror Node client, so I extended the approach a bit further.
This includes:
I also updated the REST infrastructure to support dynamic and multi-value query parameters. This was especially useful for timestamp range filtering where multiple parameters such as gt and lt may need to be sent together.
Additionally, I expanded the JSON converter layer with toAccountInfos to support the new account query flow.
Verification
The project is compiling successfully across modules with:
Overall, I felt these additional changes helped make the query API more consistent and reusable across the Mirror Node client instead of solving it only for transactions.
I’d appreciate any feedback or suggestions on the approach and implementation. Thanks for reviewing!