How to get the modified date and time for item versions in Sitecore via Graphql query

You need to read the field __updated which will hold the value of the updated date of the item. Below is how your GraphQL will look like:

{
  item(path: "/sitecore/Content/Home", language: "en") {
    name
    versions {
      path
      field(name: "__updated"){
        value
      }
    }
  }
}

The result:

enter image description here

Note that if you want to add the name of the user who modified the item, you should use the name __updated by. Below is a snippet when using the __updated by

{
  item(path: "/sitecore/Content/Home", language: "en") {
    name
    versions {
      path
      updatedby: field(name: "__updated by") {
        value
      }
      updatedDate: field(name: "__updated"){
        value
      }
    }
  }
}

Outcome:

enter image description here

Read more here: Source link