Rename categories to consentCategories

Exclude the UNCATEGORISED category at the SQL level so
the admin cookie/display/translations pages only see
consent-relevant categories. Removes dead client-side
UNCATEGORISED filters that are no longer needed.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-04 19:51:22 +04:00
parent 3254c6ddec
commit c26b9c0abe
10 changed files with 113 additions and 27 deletions

View File

@@ -43,8 +43,8 @@ func (r *cookieBannerResolver) Organization(ctx context.Context, obj *types.Cook
return types.NewOrganization(organization), nil
}
// Categories is the resolver for the categories field.
func (r *cookieBannerResolver) Categories(ctx context.Context, obj *types.CookieBanner, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.CookieCategoryOrderBy) (*types.CookieCategoryConnection, error) {
// ConsentCategories is the resolver for the consentCategories field.
func (r *cookieBannerResolver) ConsentCategories(ctx context.Context, obj *types.CookieBanner, first *int, after *page.CursorKey, last *int, before *page.CursorKey, orderBy *types.CookieCategoryOrderBy) (*types.CookieCategoryConnection, error) {
if err := r.authorize(ctx, obj.ID, probo.ActionCookieCategoryList); err != nil {
return nil, err
}

View File

@@ -102,7 +102,7 @@ type CookieBanner implements Node {
organization: Organization @goField(forceResolver: true)
categories(
consentCategories(
first: Int
after: CursorKey
last: Int