UPDATE: Bug/Schema non-conformance in ... on DependencyValue

Here is the example query.

{
  items(ids: "123123123") {
    column_values {
      ... on BoardRelationValue {
        linked_item_ids
      }
      ... on DependencyValue {
        linked_item_ids
      }
    }
  }
}

There is a problem here because according to the schema linked_item_ids on BoardRelationValue is of type [ID!] and DependencyValue is ID!. This means the two fragments cannot be used together technically.

Although in an practice it works because the two column types never overlap. The real problem is the return values:

{
  "data": {
    "items": [
      {
        "column_values": [
          {
            "id": "connect_boards",
            "type": "board_relation",
            "linked_item_ids": [
              "555555555"
            ]
          },
          {
            "id": "dependency",
            "type": "dependency",
            "linked_item_ids": "[555555555]"
          }
        ]
      }
    ]
  }
}

You will notice, BoardRelationValue returns [ID!] in conformance with the schema The schema for DependencyValue says it will return ID! which is the ID itself as a string - yet it returns a serialized [Int!]

Ideally, since the property is called linked_item_ids it would return [ID!] - which would not match the current schema, but be consistent with BoardRelationValue, and would support multiple dependencies. (The schema should be updated)

This issue is present in 2023-10 and 2024-01, I also already submitted the form to report this. This post is just because the form is hard to format everything in plus I wanted to make community aware of the apparent discrepency.

Hello there @codyfrisch,

Thank you for bringing this to us! We will continue this in the ticket :grin:

Cheers,
Matias

1 Like

Support informed me that this will be addressed in the next API version (Which I assume will be 2024-04). Adding this so other devs can be aware this fix may break their workarounds to the existing error. (If you were JSON.parse() the linked_item_ids string and using the resulting [Int!])

1 Like