-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: support passing product data with createProduct and createProductVariant #6150
Conversation
Signed-off-by: Eric Dobbertin <[email protected]>
to createProduct mutation Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Eric Dobbertin <[email protected]>
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.
@aldeed I can create variants with a price
but not compareAtPrice
. I thought prices should be set through updateVariantPrices
mutation rather than through the main variant mutations. Not sure if we should remove the prices
field, add compareAtPrice
, or just leave it as is.
Otherwise, things seem to work fine.
@aldeed I think we should allow (optional) passing of |
for new products and variants Signed-off-by: Eric Dobbertin <[email protected]>
Signed-off-by: Eric Dobbertin <[email protected]>
@zenweasel Added setting _id on creation for products and variants @mikemurray This is an existing issue so I cannot remove @manueldelreal This should be ready for final testing now. |
on input fields Signed-off-by: Eric Dobbertin <[email protected]>
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.
Resolves #6103
Type: feature
Changes
createProduct
mutationcreateProduct
mutation param to allow skipping auto-creation of the first variantcreateProductVariant
mutationBreaking changes
None
Testing
product
param tocreateProduct
mutation with all available fields set, and verify that they have correct values in the response and the database.variant
param tocreateProductVariant
mutation with all available fields set, and verify that they have correct values in the response and the database.updateProduct
andupdateProductVariant
mutations still work correctly for updating the same fields.shouldCreateFirstVariant: false
when calling thecreateProduct
mutation, and verify that thevariants
array is empty in the response, and that no variant was created in the database.