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(configure-apollo): add special mapping for Store entity #531

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

qmateub
Copy link
Contributor

@qmateub qmateub commented Apr 9, 2019

Summary

Now that we are starting to play with Stores in orders, we need a filter for stores in the orders list.

Because we want to use our ReferenceFilter this means that we will use GraphQL for reading values from the cache when it is needed.

The "problem" is that the main attribute for identifying a store is the key rather than the id as clarified by @yanns (👏 ) and similar to the project entity from Core API. So we need a special mapping for it in the apollo cache 🚀

@qmateub qmateub requested review from adnasa, emmenko and tdeekens April 9, 2019 14:19
@qmateub qmateub self-assigned this Apr 9, 2019
@qmateub qmateub added 💅 Type: Enhancement Improves existing code 🙏 Status: Dev Review Waiting for technical reviews labels Apr 9, 2019
'Project',
'BaseMenu',
'NavbarMenu',
'Store',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that this mean that in the cache it will saved as Store:{storeKey} so later on we need to use that same format for readFragment ✌️

@tdeekens
Copy link
Contributor

tdeekens commented Apr 9, 2019

Let me know if I should prepare a release.

@qmateub
Copy link
Contributor Author

qmateub commented Apr 9, 2019

All good from my side @tdeekens. If we can merge (I cannot merge by myself 😅 ) this and prepare a release would be great! Thanks in advance 👏

@adnasa
Copy link
Contributor

adnasa commented Apr 9, 2019

Let me know if I should prepare a release.

I'm willing to try this, if this is something we can do ourselves? I'm part of the ct-org on npm last I checked 🤔

@tdeekens
Copy link
Contributor

tdeekens commented Apr 9, 2019

post merge: https://github.com/commercetools/merchant-center-application-kit/blob/master/CONTRIBUTING.md#cutting-a-release. When merging (what I'll just to now - you will get a canary release you can try out. I'll post versions here.

@tdeekens tdeekens merged commit fa4eaef into master Apr 9, 2019
@tdeekens tdeekens deleted the CON-15-add-mapping-for-store-in-apollo branch April 9, 2019 15:04
@tdeekens
Copy link
Contributor

tdeekens commented Apr 9, 2019

In this workflow you can see that this step published the canary release of:

 - @commercetools-frontend/application-shell@13.1.1-canary.1+fa4eaeff

which you can try out on your branch before cutting a release.

@adnasa
Copy link
Contributor

adnasa commented Apr 9, 2019

got it

tdeekens pushed a commit that referenced this pull request Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 Status: Dev Review Waiting for technical reviews 💅 Type: Enhancement Improves existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants