PWA-3166::Queries fire multiple times #4143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Whilst I was updating my project to PWA Studio 8.0 I noticed that some queries run twice. Couldn't directly see why this was happening so decided to check https://venia.magento.com/ where the same issue occurred.
To reproduce
Steps to reproduce the behavior:
Go to https://venia.magento.com/
Open the chrome network tab and set the filter to XHR + graphql
Click in the menu on 'Accessories'
As you can tell the GetCategories query is running twice. I've checked to see if there is a difference and but request (including params) are exactly the same.
I'm not sure if this is actually a bug or intended behaviour, hope someone can clarify?
Related Issue
Closes https://jira.corp.adobe.com/browse/PWA-3166.
Acceptance
Verification Stakeholders
Specification
Verification Steps
Test scenario(s) for direct fix/feature
Test scenario(s) for any existing impacted features/areas
Test scenario(s) for any Magento Backend Supported Configurations
Is Browser/Device testing needed?
Any ad-hoc/edge case scenarios that need to be considered?
Screenshots / Screen Captures (if appropriate)
Breaking Changes (if any)
Checklist