dehaze

Delete

A delete request only requires a where clause to filter rows to be deleted. The where clause has the same filtering options as queries.

Example: Delete all pokemons with combat_power lesser than 200:

mutation {
  delete_caught_pokemons(
    where: { combat_power: {_lt: 200}}
  ) @postgres {
    status
  }
}
const whereClause = cond("combat_power", "<", 200)

const { status } = await db.delete("caught_pokemons")
  .where(whereClause)
  .apply()

Have a technical question?

Improve the docs!