Drop narration, history and restated-code comments across the repo, keep short ones for security boundaries, upstream quirks and ordering constraints, and record the convention in CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
70 lines
1.2 KiB
GraphQL
70 lines
1.2 KiB
GraphQL
# Boxes on a page key. Public reads, admin writes; adminOnly boxes go to
|
|
# admins only. kind is "widget" or "html" (sandboxed iframe).
|
|
|
|
type Box {
|
|
id: ID!
|
|
createdAt: Time!
|
|
updatedAt: Time!
|
|
page: String!
|
|
kind: String!
|
|
widget: String
|
|
html: String
|
|
title: String
|
|
x: Int!
|
|
y: Int!
|
|
w: Int!
|
|
h: Int!
|
|
z: Int!
|
|
framed: Boolean!
|
|
# A CSS box-shadow value, or "" for none.
|
|
shadow: String!
|
|
hideOnMobile: Boolean!
|
|
adminOnly: Boolean!
|
|
componentId: ID
|
|
}
|
|
|
|
input CreateBoxInput {
|
|
page: String!
|
|
kind: String!
|
|
widget: String
|
|
html: String
|
|
title: String
|
|
x: Int
|
|
y: Int
|
|
w: Int
|
|
h: Int
|
|
z: Int
|
|
framed: Boolean
|
|
shadow: String
|
|
hideOnMobile: Boolean
|
|
adminOnly: Boolean
|
|
# Links the new box to this component; kind is then "html" and html is
|
|
# ignored.
|
|
componentId: ID
|
|
}
|
|
|
|
input UpdateBoxInput {
|
|
widget: String
|
|
html: String
|
|
title: String
|
|
x: Int
|
|
y: Int
|
|
w: Int
|
|
h: Int
|
|
z: Int
|
|
framed: Boolean
|
|
shadow: String
|
|
hideOnMobile: Boolean
|
|
adminOnly: Boolean
|
|
}
|
|
|
|
extend type Query {
|
|
boxes(page: String!): [Box!]!
|
|
}
|
|
|
|
extend type Mutation {
|
|
createBox(input: CreateBoxInput!): Box! @admin
|
|
updateBox(id: ID!, input: UpdateBoxInput!): Box! @admin
|
|
deleteBox(id: ID!): Box! @admin
|
|
}
|