Initial export

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-09-04 10:34:21 +02:00
committed by Sacha Al Himdani
parent a11dfdb244
commit d47cac911d
13 changed files with 1022 additions and 63 deletions

View File

@@ -1678,6 +1678,11 @@ func (r *mutationResolver) GenerateFrameworkStateOfApplicability(ctx context.Con
}, nil
}
// ExportFramework is the resolver for the exportFramework field.
func (r *mutationResolver) ExportFramework(ctx context.Context, input types.ExportFrameworkInput) (*types.ExportFrameworkPayload, error) {
panic(fmt.Errorf("not implemented: ExportFramework - exportFramework"))
}
// CreateControl is the resolver for the createControl field.
func (r *mutationResolver) CreateControl(ctx context.Context, input types.CreateControlInput) (*types.CreateControlPayload, error) {
prb := r.ProboService(ctx, input.FrameworkID.TenantID())
@@ -3958,6 +3963,10 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
return types.NewVendor(vendor), nil
case coredata.FrameworkEntityType:
if err := prb.Frameworks.Export(ctx, id, nil); err != nil {
panic(fmt.Errorf("cannot export organization frameworks: %w", err))
}
framework, err := prb.Frameworks.Get(ctx, id)
if err != nil {
panic(fmt.Errorf("cannot get framework: %w", err))