private function applyGroups(ClassMetadata $metadata, InputObjectType $type, array $filter, string $alias): void
    {
        $typeFields = $type->getField('groups')->type->getWrappedType(true)->getField('conditions')->type->getWrappedType(true);
        foreach ($filter['groups'] ?? [] as $group) {
            $this->applyJoinsAndFilters($metadata, $alias, $typeFields, $group['joins'] ?? [], $group['conditions'] ?? []);
            $this->applyCollectedDqlConditions($group);
        }
    }