Add uncategorised cookie category

Replace the `required` boolean column on cookie_categories with a `kind`
enum (NORMAL, NECESSARY, UNCATEGORISED). The Necessary category remains
undeletable and always-on for consent; the new Uncategorised category is
also undeletable but users can opt out of it.

When a category is deleted, its cookies are merged into the Uncategorised
category (lazy-created for legacy banners that don't have one yet).

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-20 19:00:00 +04:00
parent 2147cded9f
commit 7cd8c516b9
18 changed files with 207 additions and 70 deletions

View File

@@ -90,7 +90,7 @@ type CookieCategory implements Node {
cookieBanner: CookieBanner @goField(forceResolver: true)
name: String!
description: String!
required: Boolean!
kind: String!
rank: Int!
cookies: [CookieItem!]!
createdAt: Datetime!
@@ -212,7 +212,6 @@ input CreateCookieCategoryInput {
cookieBannerId: ID!
name: String!
description: String!
required: Boolean!
rank: Int!
cookies: [CookieItemInput!]
}