Skip to main content

ProductOptionGroupService

Contains methods relating to ProductOptionGroup entities.

Signature

constructor

method(connection: TransactionalConnection, translatableSaver: TranslatableSaver, customFieldRelationService: CustomFieldRelationService, productOptionService: ProductOptionService, eventBus: EventBus, translator: TranslatorService) => ProductOptionGroupService

findAll

method(ctx: RequestContext, filterTerm?: string, relations?: RelationPaths<ProductOptionGroup>) => Promise<Array<Translated<ProductOptionGroup>>>

findOne

method(ctx: RequestContext, id: ID, relations?: RelationPaths<ProductOptionGroup>, findOneOptions?: { includeSoftDeleted: boolean }) => Promise<Translated<ProductOptionGroup> | undefined>

getOptionGroupsByProductId

method(ctx: RequestContext, id: ID) => Promise<Array<Translated<ProductOptionGroup>>>

create

method(ctx: RequestContext, input: Omit<CreateProductOptionGroupInput, 'options'>) => Promise<Translated<ProductOptionGroup>>

update

method(ctx: RequestContext, input: UpdateProductOptionGroupInput) => Promise<Translated<ProductOptionGroup>>

deleteGroupAndOptionsFromProduct

method(ctx: RequestContext, id: ID, productId: ID) =>

Deletes the ProductOptionGroup and any associated ProductOptions. If the ProductOptionGroup is still referenced by a soft-deleted Product, then a soft-delete will be used to preserve referential integrity. Otherwise a hard-delete will be performed.

Was this chapter helpful?
Report Issue
Edited Feb 25, 2026ยทEdit this page