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.