API query by board ID hitting max <integer> value

Hi all,

This morning I came across an unexpected (but fairly obvious issue when you think about it): my queries/mutations use the following format (in Powershell) :

$colValuesJson = ($colValues | ConvertTo-Json -Depth 5)
  $query = 'mutation($board:Int!, $item:Int!, $vals: JSON!) {change_multiple_column_values(board_id:$board, item_id:$item, column_values:$vals) {id} }'
  $vars = @{'board' = $new_ouverture_bid; 'item' = [**int**]$currentItem; 'vals' = $colValuesJson}
  $vars.vals

  # create request from "query" and "vars" and make API call
  $req = @{query = $query; variables = $vars}
  $bodytxt = $req | ConvertTo-Json
  echo $bodytxt
    $bodytxt = ([System.Text.Encoding]::UTF8.GetBytes($bodytxt ))

    $response = Invoke-WebRequest -Uri $url -Headers $hdr -Method Post -body $bodytxt
    $newItemID = $response.Content | ConvertFrom-Json
    $newItemID = $newItemID.data.id

This morning, the ItemID surpassed the integer 32 bounds and so this part of the code failed:

$query = 'mutation($board:Int!, ****$item:Int!*,*** $vals: JSON!) {change_multiple_column_values(board_id:$board, item_id:$item, column_values:$vals) {id} }'
  $vars = @{'board' = $new_ouverture_bid; 'item' = *[**int**]*$currentItem; 'vals' = $colValuesJson}
  $vars.vals

Basically, I had the ItemID converted to regular int32 before sending it to the API, but this needed to be changed to int64 for it to work this morning.

Which leads me to my question: what happens when we hit the int 64 limit? I’m guessing this isn’t too far into the future given the current rate of growth?

Might be a dumb question, but this morning it is causing quite a bit of issues to have to convert everything to long… so I am trying to get ahead of the next issue.

Hey @mcd — you are correct. Board and item IDs are now larger than the max size for a 32 bit signed int.

We discovered and announced this yesterday — in our community and apps changelog.

Here’s a link to the discussion: Board IDs are now too big for an integer! Check your databases and update your apps :)

Hi dipro,

FWIW, it might be worthwhile putting it out there for the few that are using Powershell (and possibly other frameworks) that bigint cannot be serialized into JSON and will yield this when you try to put it into the query:

                  "item":  {
                               "IsPowerOfTwo":  false,
                               "IsZero":  false,
                               "IsOne":  false,
                               "IsEven":  true,
                               "Sign":  1
                           },

Github 9207

Solution seems to be to use [int64]

cheers,