-
Notifications
You must be signed in to change notification settings - Fork 22
Allow inviteShopMember to accept multiple groups #10
Allow inviteShopMember to accept multiple groups #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea behind this makes sense, and the code overall looks good.
As this is really the first breaking change in any of our new plugins, I think we need to at least discuss a process for this.
Some thoughts:
- We could just make a clean break and call this 2.0 right now. If this is the case, we'll need a new commit with the
BREAKING CHANGE
trigger for semantic-release - We could keep
groupId
as a deprecated field for now, and simply addgroupIds
and encourage everyone to use that instead, until we make a breaking change later on. - When we update Reaction to include the new version of this plugin, how do we call out there has been a breaking change? Or do we even need to do that anymore?
cc @aldeed
@kieckhafer I like the idea of keeping |
@loan-laux @kieckhafer If we pull breaking plugin changes into Reaction's stock API project, we'll need a major release for it. While we don't want to be shy of major releases, we do want to try to keep them to a minimum. The general idea is to always deprecate rather than remove, and every so often, when it's time for a major release, we'll remove everything that is currently deprecated. So yes, |
@aldeed makes sense. should we come up with some standard of tracking breaking releases across all these repos, so that when we do want to make a major Reaction release, we have some standard way of knowing which of the plugins we can update? Perhaps a ticket with at |
@aldeed Unfortunately, it looks like the |
Signed-off-by: Erik Kieckhafer <[email protected]> Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
473c1aa
to
1d23744
Compare
Signed-off-by: Loan Laux <[email protected]>
Sorry for the mixup here. I actually had PR #8 merged into this branch. I've rebased it so that it's only changes related to this PR. |
@loan-laux Now that you remind me, we came across that issue before and solved it just with DEPRECATED in description. You can follow the pattern here: https://github.com/reactioncommerce/api-plugin-pricing-simple/blob/trunk/src/schemas/schema.graphql#L113-L114 The important thing is that we can run a search for "deprecated" text across all plugins when we're ready to do a breaking release and delete stuff. |
@aldeed I figured that out and wrote "Deprecated" in the field description but it isn't all-caps. Should I update it to |
Signed-off-by: Loan Laux <[email protected]>
Nevermind, I realized that the pattern you mentioned also had a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inline comments
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
Signed-off-by: Loan Laux <[email protected]>
…n-accounts into outgrow-inviteShopMember-groupIds
Signed-off-by: Loan Laux <[email protected]>
@aldeed Implemented all of your requests here. Group IDs in |
🎉 This PR is included in version 1.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #9
Impact: breaking
Type: feature
Test with api-plugin-email-templates#7
Issue
The
inviteShopMember
mutation allows agroupId
to be specified, but it would be even better to allow multiple groups with agroupIds
array.Solution
Allow
inviteShopMember
to take agroupIds
array instead of agroupId
string.Breaking changes
groupId
variable won't work anymore forinviteShopMember
. To invite a new user to a single account, pass a single-itemgroupIds
array to the mutation.inviteNewShopMember
template needs to be at its latest version, as thegroupName
variable was updated togroupNames
.Testing
inviteShopMember
with one group in thegroupIds
array.AccountInvites
collection, thegroupIds
field has the correct value.inviteShopMember
with multiple groups in thegroupIds
array.AccountInvites
collection, thegroupIds
field has the correct value.