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

Add ordering option for action queries #457

Merged
merged 2 commits into from
Aug 23, 2022
Merged

Add ordering option for action queries #457

merged 2 commits into from
Aug 23, 2022

Conversation

hopeyen
Copy link
Contributor

@hopeyen hopeyen commented Aug 11, 2022

Resolves #442

Updated the actions graphQL schema to include sorting by inputs. Now indexers can supply orderBy and/or orderDirection when they query for actions. Default: action id, ascending order.

Example to query through the indexer-cli

 ./bin/graph-indexer indexer actions get --type=reallocate --orderBy=amount --orderDirection=desc

@hopeyen hopeyen requested a review from fordN August 11, 2022 18:31
@fordN fordN added indexer-common enhancement New feature or request labels Aug 11, 2022
@hopeyen hopeyen changed the title indexer-cli,-common: ordering action queries Add ordering option for action queries Aug 11, 2022
- Use orderBy and orderDirection inputs to align with other Graph
Protocol GraphQL APIs
Copy link
Contributor

@fordN fordN left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@hopeyen hopeyen merged commit fde2057 into main Aug 23, 2022
@hopeyen hopeyen deleted the hope/ordering-actions branch August 23, 2022 15:56
@fordN fordN mentioned this pull request Aug 29, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AQI: better default ordering of indexer actions get results, and provide user control
2 participants