function extractQueryArgs(args, pkgVersion) {
  let query = ''
  try {
    if (semver.gte(pkgVersion, '4.11.0')) {
      // Prisma 4.16.0 moved the query to a `strings` property
      query = args[0].args[0] || args[0].args.strings[0]
      if (Array.isArray(query)) {
        // RawUnsafe pass in a string, but plain Raw methods pass in an
        // array containing a prepared SQL statement and the SQL parameters
        query = query[0]
      }
    } else {
      query = args[0].args.query
    }
  } catch (err) {
    logger.error('Failed to extract query from raw query: %s', err.message)
  }

  return query
}
Extracts the raw query string from the appropriate location within the function args.
In 4.11.0 prisma refactored code and args are an array on .args, whereas before they
were an object on .args.

@param {Array} args args passed to the prisma function
@param {string} pkgVersion prisma version
@returns {string} raw query string