New warning messages in API response

We’ve added warning messages to a lot of our API calls!

For example, if you try and use a deprecated API call, you’ll get an extensions object with a list of warnings in it - link to changelog

If you store application logs, I recommend logging these values – it will give you clarity on what functions need to be updated during your migration process!

Code example

Let’s say I use the items_by_column_values query, which will be deprecated in 2023-10:

query {
  items_by_column_values(board_id:12345, column_id:numbers, column_value:"5000") {
    id
    name
  }
}

In the returned data, I will receive an extensions object, with a warning that this is being deprecated. It also contains metadata such as what part of my query is deprecated, and a code to explain the cause of the warning.

Here’s what it looks like:

{
  "data": {
    "items_by_column_values": [
      {
        "id": "4579863854",
        "name": "Develop messaging"
      }
    ]
  },
  "extensions": {
    "warnings": [
      {
        "message": "Replaced by Query.items_page_by_column_values since 2023-10",
        "locations": [
          {
            "line": 2,
            "column": 3
          }
        ],
        "path": [
          "query",
          "items_by_column_values"
        ],
        "extensions": {
          "code": "deprecatedField",
          "typeName": "Query",
          "fieldName": "items_by_column_values"
        }
      }
    ]
  },
  "account_id": 12345
}

Would love to hear your feedback in the comments below!

2 Likes

hi @dipro

That looks very good and helpful, thank you.

Please make sure this info is available at one place together with all other info on API changes. Currently it feels like I have to follow a lot of threads / messages / documents etc. to get all information we need to make a smooth transition to the new API.

1 Like

Good point – here are the 2 main places you should look:

I know there’s a lot of posts in the community but if a new feature comes out it’ll be in one of those places (if not both).