-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
NoMongo: Add allUsers Query #3186
Comments
Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues. |
please assign this is related to feature I am already working on #3527 |
|
Solution:
please take a look at this video where i have demonstrated this approach at api using graphiql allUsersQueryVideo.webm |
Ok. Go ahead |
Are you still working on this? |
Apologies for the delay in completing this issue. While implementing the pagination feature, I discovered a bug in the backward pagination logic that required additional debugging and fixing, which took some extra time. |
@palisadoes @xoldd PTAL The issue was with the way we handled the previousPage check. We were fetching limit + 1 items from the database to determine if a previous page existed. If the length of the fetched data was equal to limit + 1, it indicated that a previous page was available. After setting the previousPage flag to true, we were supposed to remove the extra fetched element (i.e., the last item), but the existing logic was incorrectly removing the first element instead. This caused backward pagination to skip the last item and instead return elements beyond the intended range. As a result, the pagination would break—forward pagination worked fine, but backward pagination was returning incorrect sequences (as shown in the image). I’ve now fixed this issue, which should ensure that backward pagination returns the correct results. That’s why it took a bit longer than expected. Forward pagination works fine. But for backward pagination it will skip few elements. Here the first page should have 4 members when navigated backwards but it has only two. Pagination.Bug.webmFixed Backward Pagination Pagination.Bug.Fixed.webm |
|
Yes. This is a universal issue as the bug is present in defaultGraphQLConnection.ts. Creating issue for this |
Is your feature request related to a problem? Please describe.
A query is needed to fetch all the users from the database for administrative purpose. This is been discused in this conversation.
Describe the solution you'd like
Make a query to fetch all the users from postgres database.
Additional context
Related issue Talawa-Admin #3527
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: