Query: content_section
March 7th, 2023
Description:

This query returns all the content sections sorted by ascending order using position by default. We support a new argument sort_direction.

New Argument:

sort_direction - This argument determines whether the array would be sorted in ascending order or descending order. The valid inputs are asc and desc.

Sample Query:

query ContentSections {
  contentSections(sort_direction: asc) {
    id
    redirect_url
    content_image {
      id
      filesize
      filename
      url
    }
    position
  }
}
Sample Response:

{
  "data": {
    "contentSections": [
      {
        "id": "5",
        "redirect_url": "https://www.pixelstalk.net/wp-content/uploads/images6/Funny-Anya-Forger-Wallpaper-HD.jpg",
        "content_image": null,
        "position": 1
      },
      {
        "id": "8",
        "redirect_url": "https://www.pixelstalk.net/wp-content/uploads/images6/Funny-Anya-Forger-Wallpaper-HD.jpg",
        "content_image": null,
        "position": 2
      },
      {
        "id": "7",
        "redirect_url": "https://www.pixelstalk.net/wp-content/uploads/images6/Funny-Anya-Forger-Wallpaper-HD.jpg",
        "content_image": null,
        "position": 3
      }
    ]
  }
}
X
Crafted by