Skip to content

Retrieve the softDelete productOptionGroup #3281

Closed
@hooooooouzx

Description

@hooooooouzx

Describe the bug
I use removeOptionGroupFromProduct to remove an optionGroup from a product,all the productVariants have been softDelete.
But after this remove,I can still useProductOptionGroup GraphQL API get the optionGroup which had been deleted .I checked the database and the column deletedAt has value,I was so weird why I could get an entity which had been softDeleted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Product
  2. Create some optionGroups
  3. Create some options in every optionGroup
  4. Create some ProductVariants
  5. Call deleteProductVariant GraphQL to softDelete all ProductVariants
  6. Call deleteProductOption GraphQL to delete all options
  7. Call removeOptionGroupFromProduct GraphQL to remove all optionGroups from this product
  8. Call ProductOptionGroup GraphQL with productOptionGroupId to retrieve the option group,I can still get the removed optionGroups

Expected behavior
After removeOptionGroupFromProduct,the ProductOptionGroup shouldn't be retrieved.

Environment (please complete the following information):

  • @vendure/core version: V3.1.0
  • Nodejs version: V22.10.0
  • Database (mysql/postgres etc): postgres

Additional context
Use Admin UI to create product details.Use PostMan to test GraphQL.

Thanks~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ♻️ In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions