-
Notifications
You must be signed in to change notification settings - Fork 2.2k
refactor: create archiveProducts GQL mutation to replace meteor methods
#5680
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
refactor: create archiveProducts GQL mutation to replace meteor methods
#5680
Conversation
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
…ed of meteor methods Signed-off-by: Erik Kieckhafer <[email protected]>
…r-convertCatalogMethodsToGQL
|
This is a client and server side update. @mikemurray can you please make sure all the client side archiving works as it should. |
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]>
mikemurray
left a comment
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.
UI archive buttons look good
aldeed
left a comment
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.
A few comments. What do you think about making an archiveProductVariants GraphQL mutation, but in it just call the same archiveProducts internal mutation? For now they'd be identical but it would allow us to change them behind the scenes later.
imports/plugins/included/product-admin/client/hocs/withProduct.js
Outdated
Show resolved
Hide resolved
imports/plugins/included/product-admin/client/hocs/withVariantForm.js
Outdated
Show resolved
Hide resolved
imports/plugins/included/product-detail-simple/client/containers/publish.js
Outdated
Show resolved
Hide resolved
imports/plugins/included/product-variant/containers/productGridContainer.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@aldeed comments addressed, new |
Signed-off-by: Erik Kieckhafer <[email protected]>
archiveProducts GQL mutations to replace meteor methods
archiveProducts GQL mutations to replace meteor methodsarchiveProducts GQL mutation to replace meteor methods
aldeed
left a comment
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.
@kieckhafer When I run the new test locally, I see Mutation.archiveProducts defined in resolvers, but not in schema. I don't know why because it's in the schema file and all the necessary imports seem to be there. But maybe that's a clue as to why the memory error?
The rest of this code LGTM
|
@kieckhafer Also make sure all |
…r-convertCatalogMethodsToGQL
Signed-off-by: Erik Kieckhafer <[email protected]>
|
@aldeed I updated all the |
…r-convertCatalogMethodsToGQL
Signed-off-by: Eric Dobbertin <[email protected]>
Resolves parts of #5679
Impact: minor
Type: feature|refactor
Issue
As part of our effort to demeteorize the app, we need to convert remaining meteor methods to GQL mutations / queries.
Solution
This PR adds the following mutation:
archiveProductsThis PR removes the following meteor methods:
products/archiveProduct&products/deleteVariantInstead of creating a second mutation to clone the
products/deleteVariantmeteor method, I've adjustedarchiveProductsto accept bothproductsandvariantsas input.Notes
Should this be renamed
archiveProductsOrVariants, since it can do both?Breaking changes
Any custom code using any of the above meteor methods will need to be refactored to use the new GQL methods.
Testing