refactor: use GraphQL string scalar for KSUID transit

Marshal and unmarshal both use the base62 KSUID string, replacing the
legacy JSON object wrapper and aligning gqlgen scalar behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-29 18:03:39 -07:00
parent 29b855f2b9
commit 0f8e79a890
7 changed files with 36 additions and 39 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ import (
)
// StringKSUID wraps segmentio/ksuid for text-column storage (VARCHAR, TEXT).
// SQL Scan/Value use the base62 string encoding. GraphQL transit uses the
// shared string JSON transport (see ksuid_gql.go).
// SQL Scan/Value use the base62 string encoding. GraphQL transit uses a string
// scalar (base62 KSUID).
type StringKSUID struct {
ksuid.KSUID
}