Expose showBranding as read-only GraphQL field and reflect it in theme preview

Uses the Loader + Page + Fragment pattern so the snippet page fetches
its own data instead of relying on Outlet context.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-22 14:47:36 +04:00
parent df698b5b21
commit b1607d76c5
6 changed files with 123 additions and 36 deletions

View File

@@ -84,6 +84,7 @@ type CookieBanner implements Node {
privacyPolicyUrl: String!
consentExpiryDays: Int!
consentMode: CookieConsentMode!
showBranding: Boolean!
organization: Organization @goField(forceResolver: true)

View File

@@ -72,6 +72,7 @@ func NewCookieBanner(b *coredata.CookieBanner) *CookieBanner {
PrivacyPolicyURL: b.PrivacyPolicyURL,
ConsentExpiryDays: b.ConsentExpiryDays,
ConsentMode: b.ConsentMode,
ShowBranding: b.ShowBranding,
CreatedAt: b.CreatedAt,
UpdatedAt: b.UpdatedAt,
}