Skip to content

fix: skip graphql query if parameter is null#188

Merged
enzomerca merged 3 commits intomasterfrom
fix/B2BTEAM-1740-reduce-graphql-calls
Oct 16, 2025
Merged

fix: skip graphql query if parameter is null#188
enzomerca merged 3 commits intomasterfrom
fix/B2BTEAM-1740-reduce-graphql-calls

Conversation

@enzomerca
Copy link
Contributor

What problem is this solving?

We were observing the error Variable "$email" of required type "String!" was not provided on the logs and this PR avoid calls that were causing the error.
Now the getBinding query is skipped if the userEmail parameter is empty (resulting in the same behaviour)

How to test it?

Login and go to My Account (Profile) page
Looking at the Network tab of the browser inspector you can observe the error is not happening (compared to a workspace without the fix)
Workspace

@enzomerca enzomerca requested a review from a team November 22, 2024 16:40
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Nov 22, 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 😞

@github-actions
Copy link

github-actions bot commented Nov 22, 2024

Messages
📖 ❤️ Thanks!
📖

🎉 PR additions = 4, PR deletions = 0

Generated by 🚫 dangerJS against 8b9d0f4

@enzomerca enzomerca changed the title fix: remove unnecessary call to getBinding when email is empty fix: skip graphql query if parameter is null Nov 22, 2024
@sonarqubecloud
Copy link

@enzomerca enzomerca merged commit 1b44096 into master Oct 16, 2025
14 of 15 checks passed
@enzomerca enzomerca deleted the fix/B2BTEAM-1740-reduce-graphql-calls branch October 16, 2025 12:50
@vtex-io-ci-cd
Copy link

vtex-io-ci-cd bot commented Oct 16, 2025

Your PR has been merged! App is being published. 🚀
Version 3.1.0 → 3.1.1

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.b2b-organizations@3.1.1

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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