# 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 }