Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aldeed
Copy link
Contributor

@aldeed aldeed commented Dec 12, 2018

Resolves #4842
Impact: minor
Type: bugfix

Issue

The primaryShopId GraphQL query returns null if the domain to which you make the request isn't in the domains array of any shop. While it's not usually hard to add all domains to the list in a production db, this is an unnecessary burden for CI staging deploys and local development.

Solution

Fall back to Shops.findOne({ shopType: "primary" })

Breaking changes

None

Testing

In MongoDB, clear the domains array for all Shop documents. Verify that the starterkit storefront UI still displays without errors and functions as expected.

@aldeed aldeed self-assigned this Dec 12, 2018
@aldeed aldeed requested a review from kieckhafer December 12, 2018 13:52
@aldeed aldeed added this to the πŸ” Shavano milestone Dec 12, 2018
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good.

Starterkit works as expected.

πŸ‘

@kieckhafer kieckhafer merged commit 5005ad9 into release-2.0.0-rc.8 Dec 14, 2018
@aldeed aldeed deleted the fix-4842-aldeed-primary-shop-id-fallback branch December 17, 2018 00:21
@spencern spencern mentioned this pull request Jan 8, 2019
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.

3 participants