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

Implement the pagination to RegisteredReactions #471

Closed
dadamu opened this issue Jun 10, 2021 · 3 comments · Fixed by #476
Closed

Implement the pagination to RegisteredReactions #471

dadamu opened this issue Jun 10, 2021 · 3 comments · Fixed by #476
Assignees
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/posts Post module

Comments

@dadamu
Copy link
Contributor

dadamu commented Jun 10, 2021

Feature description

This issue is for the RegisteredReaction part's implementation of #448.
Each of registered reactions are associated to only one key so we can keep the current store logic.

Implementation proposal

Add the pagination field to RegisteredReaction, then revise it to have a paginated query.

@dadamu dadamu added kind/enhancement Enhance an already existing feature; no "New feature" to add x/posts Post module labels Jun 10, 2021
@dadamu dadamu changed the title Implement the pagination to RegisteredReaction Implement the pagination to RegisteredReactions Jun 10, 2021
@dadamu
Copy link
Contributor Author

dadamu commented Jun 10, 2021

The current RegisteredReaction key is shortcode+subspace. In my opinion, it should be swapped to subspace+shortcode so that the user can query registered reactions in the subspace. Then we can also add new query method called QueryRegisteredReactionsWithSubspace.

What do you think?
@RiccardoM @bragaz

@RiccardoM
Copy link
Contributor

@dadamu I agree with you on this change. Also, no need to add a new query. We can simply add a parameter to the QueryRegisteredReaction named SubspaceId. If SubspaceId is empty, we query for all reactions on all subspaces. Otherwise, we query only for those registered inside such subspace

@dadamu dadamu self-assigned this Jun 10, 2021
@RiccardoM RiccardoM modified the milestone: v0.17.0 Jun 10, 2021
@leobragaz
Copy link
Contributor

leobragaz commented Jun 10, 2021

@dadamu @RiccardoM I agree on both, we should consider to include subspaceID as part of a storeKey where's possible to make it easier to query elements based on their subspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Enhance an already existing feature; no "New feature" to add x/posts Post module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants