We are in the process of migrating from REST to GraphQL and are looking for a way to fetch all unpublished custom collections. In REST we use published_status=unpublished to do so. What is the best way to accomplish the same result using GraphQL?
To fetch all unpublished collections, you can filter by publishable_status:${your_publication_id}:unpublished
like this:
query($query: "publishable_status:123271807055:unpublished") {
collections(first: 50, query: $query) {
edges {
node {
id
}
}
}
},
You can get your publications using publications.
1 Like