Text field results for mirror/connect boards

Hello,

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:

{
  boards(ids: id) {
    items_page(query_params:{ids: id}) {
      items {
        column_values(ids:"mirror") {
          text
        }
      }
    }
  }
}

It seems that in the new version, the text values are still being returned, and they are not showing as null or empty results.

The question is whether this behavior will persist, or should we anticipate that in the near future, it will no longer return a value?

Thank you

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

1 Like

Hello @Roy,

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

1 Like

will the fragment method still work?

Hi @Matias.Monday ,

It seems that display_value is still unavailable.
Is there an ETA when this change will apply?

Thanks

Hello @Roy,

This will be implemented today.

Cheers,
Matias

1 Like

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.

Hello there @kolaai,

I will speak with the team and let you know what they say about this :grin:

I will also request for this to be added to the docs.

Cheers,
Matias

1 Like

Hello again @kolaai,

I heard back from the team.

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”.

I have requested this to be added to the docs :grin:

Cheers,
Matias

1 Like

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
                                          	
                                        }
                                    		
                                   }
                              }
                         }
                    }

Hi @Dkdesignhawaii,

Welcome to the community!

Are you getting an error after running the query you posted? If so, what does it say?

Best,
Rachel

Hi Rachel I’m getting the following:

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 see the issue here!

The display_value field is only available through the relevant implementation for mirror, dependency, and connect board columns.

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
      }
    }
  }
}
2 Likes

OK that works for Mirrored columns, thanks.

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
      }
    }
  }
}

So I need a combination apparently…

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
   }
  }
 }
}
1 Like

Thanks Cody that is really helpful!

1 Like