getVersionsByEntryId is deprecated. Can't find the new method? We are using getVersionsByEntryId in our XML sitemap to return the number of times an entry has been saved, then comparing that with todays date and the date the entry was created to determine the changefreq over that time:

{% set revisions = craft.app.entryRevisions.getVersionsByEntryId(element.id)|default(1)|length %}


Looking at the docs however, this is now deprecated:


  DEPRECATED
  
  Deprecated in 3.2. Use an entry query instead.


I can't seem to find anything in the docs for an entry query? Could someone point me in the right direction?
You can use the revisionOf parameter (docs).

{% set revisions = craft.entries.revisionOf(element.id).all|default(1) %}