API 2023-10, updating items to items_page

I tried to follow the guides but can’t get the new query to run in the Playground. Can I get an assist please? Here is the original that works in 2023-07:

query {
  boards(ids: 0123456789) {
    groups(ids: "groupA") {
      items(limit: 99) {
        id
        name
        column_values(
          ids: [
            "text2"
            "text7"
            "creation_log"
            "item_id5"
            "text5"
            "dropdown1"
            "text31"
            "status"
          ]
        ) {
          title
          text
        }
        subitems {
          id
          name
          column_values(ids: ["checkbox5", "numbers", "numbers7", "numbers9"]) {
            title
            text
          }
        }
      }
    }
  }
}

Can you try:

{
  boards(ids: 123456789) {
    groups(ids: "groupA") {
      items_page(limit: 99) {
        items {
          id
          name
          column_values(
            ids: ["text2", "text7", "creation_log", "item_id5", "text5", "dropdown1", "text31", "status"]
          ) {
            text
          }
          subitems {
            id
            name
            column_values(ids: ["checkbox5", "numbers", "numbers7", "numbers9"]) {
              text
            }
          }
        }
      }
    }
  }
}

Removed the column_values.title as title is not a supported field on column_values. Added the items_page for 2023-10. I did not test it but it should bring you very close.

1 Like

That makes sense- title was specified in the error, but I couldn’t find mention of it’s demise in the API articles. My python script queries the board and works on the data based on the column title. I’m looking at the New Column Values article but scratching my head. How do I query the column title now in 2023-10?

The column title is a field of the columns structure underneath boards

I get an error on line 3: Expected Name found “[”.
How would this work for the subitem titles? Is there any documentation on this?

oops… typo
See: Columns

Ah, ok. Now the query results have two separate lists: one with the titles, and then one with the values. This would mean rewriting all my python code. I also can’t find any documentation on getting at the subitem title.

Original (desired) result:

{
  "data": {
    "boards": [
      {
        "groups": [
          {
            "items": [
              {
                "id": "5485065803",
                "name": "Test Pallet",
                "column_values": [
                  {
                    "title": "LPN",
                    "text": "1234"
                  },
                  {
                    "title": "Bin",
                    "text": "E3E3"
                  },
                  {
                    "title": "Status",
                    "text": "Put Away"
                  },
                  {
                    "title": "Staff",
                    "text": null
                  },
                  {
                    "title": "Invoice",
                    "text": "ASDF1234"
                  },
                  {
                    "title": "PutDate",
                    "text": "2023-11-09 17:50:46 UTC"
                  },
                  {
                    "title": "Item ID",
                    "text": "5485065803"
                  },
                  {
                    "title": "Item Type",
                    "text": ""
                  }
                ],
                "subitems": [
                  {
                    "id": "5485068084",
                    "name": "300.TET",
                    "column_values": [
                      {
                        "title": "Received",
                        "text": ""
                      },
                      {
                        "title": "Qty",
                        "text": "321"
                      },
                      {
                        "title": "Replenished",
                        "text": ""
                      },
                      {
                        "title": "Partial",
                        "text": ""
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }

And the result from your solution:

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "title": "LPN"
          },
          {
            "title": "Bin"
          },
          {
            "title": "Status"
          },
          {
            "title": "Staff"
          },
          {
            "title": "Invoice"
          },
          {
            "title": "PutDate"
          },
          {
            "title": "Item ID"
          },
          {
            "title": "Item Type"
          }
        ],
        "groups": [
          {
            "items_page": {
              "items": [
                {
                  "id": "5485065803",
                  "name": "Test Pallet",
                  "column_values": [
                    {
                      "text": "1234"
                    },
                    {
                      "text": "E3E3"
                    },
                    {
                      "text": "Put Away"
                    },
                    {
                      "text": ""
                    },
                    {
                      "text": "ASDF1234"
                    },
                    {
                      "text": "2023-11-09 17:50:46 UTC"
                    },
                    {
                      "text": "5485065803"
                    },
                    {
                      "text": null
                    }
                  ],
                  "subitems": [
                    {
                      "id": "5485068084",
                      "name": "300.TET",
                      "column_values": [
                        {
                          "text": ""
                        },
                        {
                          "text": "321"
                        },
                        {
                          "text": null
                        },
                        {
                          "text": null
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          }
        ]
      }
    ]
  }

Alternatively you can do:

{
  boards(ids: 123456789) {
    groups(ids: "groupA") {
      items_page(limit: 99) {
        items {
          id
          name
          column_values(
            ids: ["text2", "text7", "creation_log", "item_id5", "text5", "dropdown1", "text31", "status"]
          ) {
            text
            column {
              title
            }
          }
          subitems {
            id
            name
            column_values(ids: ["checkbox5", "numbers", "numbers7", "numbers9"]) {
              text
              column {
                title
              }
            }
          }
        }
      }
    }
  }

I believe this is working for subitems too.

1 Like

This returns:

{
  "errors": [
    {
      "message": "Query has depth of 7, which exceeds max depth of 6",
      "locations": [
        {
          "line": 22,
          "column": 17
        }
      ],
      "extensions": {
        "code": "maxDepthExceeded",
        "depth": 7,
        "maxDepth": 6
      }
    }
  ],
  "account_id": 1618989
}

FYI I have tried adding IntrospectionQuery from the 3 search results on this error, but to no success.