Breaking change: New `column_values` fields and typed column values
API version 2023-10
contains a major update to the column values object, or what we like to call, column values v2. The object itself remains the same, but we introduced new fields that allow for more simple, intuitive, and expressive filtering. The five core fields include:
Field | Description |
---|---|
column Column! | The column the value belongs to. |
id ID! | The column's unique identifier. |
text String | The text representation of the column's value. Not every column supports the text value. |
type ColumnType! | The column's type. |
value JSON | The column's raw value. |
On top of the new fields, we added implementations that enable you to query subfields for a specific column type using GraphQL fragments, or queries that will only run if a specific type is returned. Each column is of a different type, so they all have unique fields to return data specific to that column.
Let's take a look at the LocationValue
type that you can use to return location column-specific fields in your query. In addition to the five core fields mentioned above, you can also return the address
, city
, city_short
, country
, country_short
, lat
, lng
, place_id
, street
, street_number
, street_number_short
, street_short
, and updated_at
fields.
Sample query
query {
items (ids:[1234567890, 9876543210]) {
column_values {
... on LocationValue {
country
street
street_number
}
}
}
}