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

feat: creates paginated organizations query #189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guidobernal-cubos
Copy link

What problem is this solving?

This update optimizes the retrieval of organizations and cost center information by implementing paginated queries instead of fetching all data at once. It prevents timeouts and improves performance when users are associated with a large number of organizations.

ClickUp: https://app.clickup.com/t/868amdqqw

How should this be manually tested?

  1. Test with an email associated with a small number of organizations to ensure correct data retrieval.
  2. Test with an email linked to a large number of organizations to verify that pagination works correctly and avoids timeouts.
  3. Confirm that:
    • A valid costId is returned if a cost center is available.
    • An organization with a status other than inactive is retrieved correctly.
    • Proper null responses occur when no valid data is found.
  4. Use edge cases, such as emails with no associated organizations, to confirm behavior.

Screenshots or example usage:

image

{ getOrganizationsPaginatedByEmail(email: "", page: 1, pageSize: 25) { data { id clId costId orgId organizationName costCenterName } pagination { page pageSize total } } }

storefront-permissions PR: vtex-apps/storefront-permissions#172

Copy link

vtex-io-ci-cd bot commented Nov 27, 2024

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants