One of the breaking changes for the API is: “Text field returns empty results for mirror, dependency, and connect boards columns when querying through column_values”
When I am running this query on the new API version 2023-10:
hi @Roy
In another topic I saw a reply from the monday team stating it was an error that it still returns the text. You need to add Fragments to your query to keep getting the data in the near future
Tomorrow after a deployment, the text field will return null for board_relation , dependency and mirror . Instead, you will have to use a different field: display_value - explicitly for each of these three
Hello @Matias.Monday,
Could you please elaborate on the reason behind display_value instead of text? That is, why make text null and then introduce a new variable?
Because now, we’ll have to check for both text for those that still use text like status columns and then also for display_value instead of just text, adding to the load of work needed to do to support the new API.
Also, I didn’t find any information about this new display_value in the documentation. I stumbled upon it in the community.
The change was made in order to improve performance. The evaluation of the “text” field in mirror columns takes a long time and lots of resources and a single query could result in the loading of hundreds of items. We now limit it and allow it only where it is needed explicitly.
For technical reasons, it was decided that it would not be called “text”.
Is this true? I can not get display_value to return anything using the 2023-10 API and mirrored columns.
query {
items_page_by_column_values(
board_id: xxxx
columns: [{column_id: "dropdown0", column_values: ["Open"]}]
) {
items {
id
name
board {
id
}
group {
title
}
column_values {
id
text
display_value
column {
title
}
}
}
}
}
Field ‘display_value’ doesn’t exist on type ‘ColumnValue’
There isn’t a lot of documentation on this.
From the docs: “Deprecated: text field returns empty values for mirror, dependency and connect boards columns when using the generic column_values object. You should retrieve this data using the display_value field instead.”
I’ve updated the docs for clarity, but either way, you could use the query below to return the display value for mirrored columns. Does this help with what you’re trying to achieve?
items (ids: 1234567890) {
column_values {
value
type
... on MirrorValue {
display_value
}
}
}
}
I had an issue with connect_boards columns… it appeared this did not work for those. Digging deeper I found this code in the docs and that seems to be what is needed for connect boards.
query {
items (ids:[1234567890, 9876543210]) {
column_values {
... on BoardRelationValue {
linked_item_ids
linked_items{
name
}
}
... on MirrorValue {
display_value
}
}
}
}
Does that look about right if I want to get what used to be “text” for mirrored and connect_boards? I ultimately need to snake my way to a display_value for the mirrors and a name field for the connected board columns?
Just so youre aware, you can actually get the items linked through the mirror via the mirror itself. Which might help because otherwise, you have to use the column{settings_str} on the mirror to find out what board_relation column contains the connection for a particular mirror column.
items {
column_values {
... on MirrorValue {
display_value
mirrored_items {
mirrored_value {
__typename
}
linked_items {
id
name
}
linked_board_id
}
}
}
}