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
Channels #12
Comments
Some real-life use-cases for Channels:
|
Determining the active ChannelConsider the following:
In general: How do we determine the active channel for a request? Possible solutions:
Implementation ideas
|
This merge includes the basic infrastructure for Channels (see #12). There is further work to be done to implement Channels fully, but this can be done in the course of regular development on master, hence this branch is now being merged.
This commit adds a new ChannelSwitcherComponent which displays a channel switcher when the current Administrator has permissions on more than one Channel. Switching channel updates local client state in the Apollo cache, and also triggers a re-fetch of any active queries. Relates to #12
A lot of work has been done on Channels over the past week. Here's a current status report:
Outstanding tasks:
|
Channels represent distinct sales outlets. Many web shops will just have a single, default channel, which is the website. However, there are cases when it would be desirable to be able to define distinct sales channels, such as:
Thus the following aspects could vary from one channel to the next:
Prior Art
Design
Adding Channels would quite significantly increase the complexity of the models. Here is a rough idea for an implementation:
id
andname
. By default, there is a "default" channel which must exist. Any number of additional channels may be created.available
property relative to each Channel. This could be as simple as a one-to-many relationship from Product -> Channels.price
would now be associated with a particular Channel.role
would be relative to a given Channel. Thus you can have Administrators who can view and administrate only selected Channels. This will be tricky to get right.channelId
argument to every query / mutation. Perhaps the active channel id can be stored in the JWT info so that it can be figured out once and then just persists for the session.The text was updated successfully, but these errors were encountered: