function retrieveQuery(args, pkgVersion) {
  if (Array.isArray(args)) {
    const action = args[0].action
    if (RAW_COMMANDS.includes(action)) {
      return extractQueryArgs(args, pkgVersion)
    }

    // Cast to string obj to attach symbol. It _must_ be a `String` instance.
    // This is done to tell query parser that we need to split the string
    // to extract contents.
    // eslint-disable-next-line no-new-wrappers, sonarjs/no-primitive-wrappers
    const clientMethod = new String(args[0].clientMethod)
    clientMethod[prismaModelCall] = true
    return clientMethod
  }
}
Extracts either the raw query or the client method.

@param {Array} args arguments to a prisma operation
@param {string} pkgVersion prisma version
@returns {string} query raw query string or model call <collection>.<operation>