Getting all board item values from columns

Hello,

I am having trouble pulling column values from my boards. I am trying to use the below query, but I keep getting the error “Field ‘items’ doesn’t exist on type ‘Board’”. I’ve tried to shift this around and mess with the syntax with no luck.

{
“query”: “{ boards(ids: 1234567890) { items(limit: 50) { column_values(ids: [“text”, “date_1”]) { title value } } } }}”
}

Hi @tcraig004,

Welcome to the community!

We recently did an API migration in which we deprecated items queries on boards. This is now replaced with items_page (read more here) to help accommodate for bigger boards.

Here’s an example that is similar to yours:

query {
  boards (ids: 1234567890, limit: 50) {
    items_page (query_params: {rules: [{column_id: "text", compare_value: "", operator: not_any_of}, {column_id: "date4", compare_value: "$$$blank$$$", operator: not_any_of}] operator: or}) {
      items {
        name
      }
    }
  }
}

This essentially would return the name of the first 50 items on board 1234567890 that do not have an empty text or an empty date_1 column.

You can play around with these new APIs to find something that will work for you - just keep complexity limits in mind!

Here are some other useful resources to check out:

  • Query column values for specific items using items_page_by_column_values (read more here)
  • Query items at the root (see more here)
  • Filter columns by specific values (see more here)

Let us know if you have any other questions!

Best,
Rachel

Thank you for the response! I was able to get it to work with:

{
“query”: “{ boards(ids: 1234567890) { items_page(limit: 500) { cursor items { id name column_values { id text value } } } } }”
}

1 Like