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]>
38 lines
945 B
GraphQL
38 lines
945 B
GraphQL
# Saved snapshots of a page's boxes and background; loading copies them.
|
|
# Admin only, reads included, since layouts keep adminOnly boxes.
|
|
|
|
type Layout {
|
|
id: ID!
|
|
createdAt: Time!
|
|
updatedAt: Time!
|
|
name: String!
|
|
# The page key it was saved from.
|
|
sourcePage: String!
|
|
boxCount: Int!
|
|
hasBackground: Boolean!
|
|
}
|
|
|
|
input CreateLayoutInput {
|
|
name: String!
|
|
# The page key to save, as it is now.
|
|
page: String!
|
|
}
|
|
|
|
input UpdateLayoutInput {
|
|
name: String
|
|
}
|
|
|
|
extend type Query {
|
|
# Newest first.
|
|
layouts: [Layout!]! @admin
|
|
}
|
|
|
|
extend type Mutation {
|
|
createLayout(input: CreateLayoutInput!): Layout! @admin
|
|
# Renames it; what a layout holds never changes after it is saved.
|
|
updateLayout(id: ID!, input: UpdateLayoutInput!): Layout! @admin
|
|
deleteLayout(id: ID!): Layout! @admin
|
|
# replace: true first saves the page as a layout, then swaps in this one.
|
|
applyLayout(id: ID!, page: String!, replace: Boolean!): [Box!]! @admin
|
|
}
|