Skip to main content

Function: rmQueryById()

rmQueryById(directory): (id, version?, persistFiles?) => Promise<void>

Defined in: queries.ts:209

Delete a query by it's id.

Optionally specify a version to delete a specific version of the query.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
idstring
version?string
persistFiles?boolean

Returns

Promise<void>

Example

import utils from '@eventcatalog/utils';

const { rmQueryById } = utils('/path/to/eventcatalog');

// deletes the latest InventoryAdjusted query
await rmQueryById('GetOrder');

// deletes a specific version of the GetOrder query
await rmQueryById('GetOrder', '0.0.1');