Pieces
A piece is a structure formed from one or more components, similar to a shape. Unlike a shape, a piece can be reused across multiple shapes and/or structural components. This streamlines the creation of shape structures that are identical across products, documents, and folders. Pieces also have an extensive nesting capability that makes them especially useful for polymorphic or repeating content.
In order to perform these operations, ensure that you have the proper authentication (if necessary) and user permissions.
Fetching Pieces From an Item
Here’s an example query showing how to retrieve information about pieces from an item, and the components and/or pieces they contain. Refer to the API docs at https://api.crystallize.com/your-tenant-identifier/catalogue for more parameters and other information.
query {
catalogue(language: "en", path: "/docs/myarticle") {
id
components {
id
name
type
content {
__typename
... on PieceContent {
components {
id
content {
__typename
... on BooleanContent {
value
}
}
}
}
}
}
}
}