Skip to main content

collections

Overview

Fetch a paginated list of collections. You can tailor the fields you need on data and pagination.

Query

query FindAllCollections($input: GetAllCollectionsInput) {
findAllCollections(input: $input) {
success
message
data {
_id
title
slug
description
operation
image {
# add fields you need, e.g. url, alt
}
}
pagination {
# add fields you need, e.g. page, limit, total, pages
}
}
}

Variables

{
"input": {
"page": 1,
"limit": 20
}
}

Examples

curl -X POST \
https://subdomain.com \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
--data-binary @- << 'EOF'
{
"query": "query FindAllCollections($input: GetAllCollectionsInput) { findAllCollections(input: $input) { success message data { _id title slug } pagination { /* add fields */ } } }",
"variables": { "input": { "page": 1, "limit": 20 } }
}
EOF

Notes

  • Replace <TOKEN> with a valid token.
  • Add the exact fields you need inside image {} and pagination {}.
  • If your API enforces specific filters in GetAllCollectionsInput, include them under input accordingly.