CardanoSolutions / ogmios

❇️ A WebSocket JSON/RPC bridge for Cardano
https://ogmios.dev
Mozilla Public License 2.0
304 stars 90 forks source link

Nest connection inside `getServerHealth` `options` paramater #135

Closed rhyslbw closed 2 years ago

rhyslbw commented 2 years ago

After https://github.com/CardanoSolutions/ogmios/pull/134 is merged there will be two optional parameters in the getServerHealth function. To align with the pattern of defining a single options argument, we would need to introduce a breaking change.

https://github.com/CardanoSolutions/ogmios/blob/efabffa9dcac8b1ebedf0f11f61615752908ce81/clients/TypeScript/packages/client/src/ServerHealth.ts#L53-L55

export const getServerHealth = async ( 
  options? {
    connection?: Connection,
    logger?: Logger
  } 
 ): Promise<ServerHealth> => { 
KtorZ commented 2 years ago

This can possibly be introduced as a non-breaking change right?

export const getServerHealth = async ( 
  connection? : Connection 
  | 
  options? {
    connection?: Connection,
    logger?: Logger
  } 
 ): Promise<ServerHealth> => {