Add delete vendor action

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-02-12 15:50:01 -08:00
parent 32e6391c80
commit fe95902c81
8 changed files with 330 additions and 15 deletions

View File

@@ -78,6 +78,16 @@ func (r *mutationResolver) CreateVendor(ctx context.Context, input types.CreateV
return types.NewVendor(vendor), nil
}
// DeleteVendor is the resolver for the deleteVendor field.
func (r *mutationResolver) DeleteVendor(ctx context.Context, input types.DeleteVendorInput) (string, error) {
err := r.svc.DeleteVendor(ctx, input.VendorID)
if err != nil {
return "", fmt.Errorf("cannot delete vendor: %w", err)
}
return "", nil
}
// Frameworks is the resolver for the frameworks field.
func (r *organizationResolver) Frameworks(ctx context.Context, obj *types.Organization, first *int, after *page.CursorKey, last *int, before *page.CursorKey) (*types.FrameworkConnection, error) {
cursor := types.NewCursor(first, after, last, before)