Join GitHub today
feat: add product and productVariant related GraphQL mutations #5562
Resolves parts of #5529
One regression / change here is that when you create a new product / variant, you are no longer redirect to that new variant page. The reason is when we use a GraphQL mutation, the new product / variant is created almost immediately, however, it takes 1+ seconds for the Meteor subscriptions to update and include the new product. Because of this, when redirecting, you'd land on the page of a variant that isn't yet in the Meteor subscription, and there would be an error. Because of the need to refactor the components soon anyway, I think this is a decent trade off, as opposed to delaying this PR and refactoring all of these components now. I've left a comment in the code suggesting we re-add this feature when these components are updated.
Any custom plugins which use any of the above listed meteor methods will need to be updated to use the GraphQL mutation instead
You can see that all the new resolvers,