Migrating
While we try to avoid breaking changes, sometimes it's unavoidable in order to offer you the latest features.
v0.27.38
useOptions: true
By default, generated clients will use a single object argument to pass values to API calls. This is a significant change from the previous default of unspecified array of arguments. If migrating your application in one go isn't feasible, we recommend deprecating your old client and generating a new client.
ts
import { DefaultService } from 'client' // <-- old client with array arguments
import { DefaultService } from 'client_v2' // <-- new client with options argument
This way, you can gradually switch over to the new syntax as you update parts of your code. Once you've removed all instances of client
imports, you can safely delete the old client
folder and find and replace all client_v2
calls to client
.