Add control node query support

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-01-31 08:33:38 -08:00
parent c03be7636a
commit ddfd3928ac
3 changed files with 84 additions and 0 deletions

View File

@@ -131,6 +131,13 @@ func (r *queryResolver) Node(ctx context.Context, id gid.GID) (types.Node, error
}
return types.NewFramework(framework), nil
case coredata.ControlEntityType:
control, err := r.svc.GetControl(ctx, id)
if err != nil {
return nil, err
}
return types.NewControl(control), nil
default:
}