Tags

GraphQL
API
external
quickstart

Query in the playground

To write our query for the BlogArticle, we can use the playground. Hit the playground icon in the main navigation to get there.

caisy screenshot interface playground code editor query

You should find a label in the Explorer tab with "allBlogArticle". In explorer, you got checkboxes for every field of the query you can build. 
Just click on that label to start generating the query. Once all the fields are selected inside the edges and node, try to run the query

With the explorer, you can end up with something like the GraphQL query below. You can copy this query below, paste it into your playground and run it.

query MyQuery {
  allBlogArticle {
    edges {
      node {
        slug
        text {
          json
        }
        title
      }
    }
  }
}

After executing the query, you might get a similar result, depending on what you entered during the previous steps.

{
  "data": {
    "allBlogArticle": {
      "edges": [
        {
          "node": {
            "slug": "rev-up-with-caisy",
            "text": {
              "json": {
                "content": [
                  {
                    "attrs": {
                      "textAlign": "left"
                    },
                    "content": [
                      {
                        "text": "Empower your workflow with Caisy, the fastest headless CMS. Tailored for agencies, it simplifies content management, boosts efficiency, and fosters innovation.",
                        "type": "text"
                      }
                    ],
                    "type": "paragraph"
                  }
                ],
                "type": "doc"
              }
            },
            "title": "Rev Up with Caisy!"
          }
        }
      ]
    }
  }
}


Tags

GraphQL
API
external
quickstart