GraphQL mutation works in API Connector but fails in Workflow

The problem is probably with swapRecordIds and addOnIds.
In the test call you are sending an array as dynammic value for both parameters, but in the workflow you are just sending a string.
In bubble when you have a list of things and you put each item's something in a text field you get a string with the values separated by a coma. Just a single string.
Instead, you need an array in valid json format. You may want to use the format as operator to do that (see here for docs).