-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: gql where args #298
fix: gql where args #298
Conversation
WalkthroughThe recent updates encompass ignoring a new directory in version control, enhancing the GraphQL query building in the indexer component, and refining a test function with additional filtering conditions. These changes aim to streamline development workflow, improve the reliability of code involving data fetching, and ensure more precise test results. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- .gitignore (1 hunks)
- src/indexer-nibi/gql.ts (2 hunks)
- src/indexer-nibi/heart-monitor.test.ts (1 hunks)
Additional comments: 5
src/indexer-nibi/gql.ts (3)
- 12-32: The
objToGql
function has been updated to handle object conversion more robustly. Ensure that the conversion logic correctly handles all edge cases, especially sinceJSON.stringify
is used for non-object types, which could introduce quotes around strings that may not be desired in all GraphQL contexts.- 34-37: The
getWhereArgArr
function now uses the updatedobjToGql
to construct thewhere
clause. Verify that thewhere
clause generated by this function is correctly formatted and that all callers of this function have been updated to handle the new return type if it has changed.- 102-107: The
gqlQuery
function has been adjusted to improve query generation. The introduction of theres
variable to store the result before returning is a good practice for debugging and readability. However, ensure that the logic for including parentheses around the query arguments is correct and that theexcludeParentObject
parameter is being used appropriately by all callers..gitignore (1)
- 206-207: The addition of the
nibiru/
directory to.gitignore
is a straightforward change. Confirm that this directory is indeed not needed in the version control and that no required files are being ignored.src/indexer-nibi/heart-monitor.test.ts (1)
- 1019-1022: The
testWasm
function now includes additional filtering criteria foruserContracts
. Ensure that the new conditions (contractAddress
like "123" anduserAddress
equal to "456") are correctly implemented and that all test cases have been updated to reflect these changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- src/indexer-nibi/gql.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- src/indexer-nibi/gql.ts
Sonar test coverage failing check, to be fixed in later PR |
* fix: gql where args (#298) * fix: gql where obj to gql string * fix: review comments * chore: pr title lint workflow (#293) --------- Co-authored-by: Ruslan Shakirov <[email protected]>
## [3.0.0](v2.0.1...v3.0.0) (2024-02-05) ### Bug Fixes * fix merge ([4f93be8](4f93be8)) * gql where args ([#298](#298)) ([b57ef0a](b57ef0a)) * more file reorg ([#300](#300)) ([d6a053a](d6a053a)) ### Miscellaneous Chores * pr title lint workflow ([#293](#293)) ([b5dd050](b5dd050)) ### Code Refactors * tests ([#301](#301)) ([e14b83b](e14b83b)) [skip ci]
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary by CodeRabbit
Chores
.gitignore
to exclude a specific directory.New Features
Tests