I'm not sure how this graphql query works

I have a graphql query that I use to grab the lastest commit on a branch, but I’m not really sure how it works. I’m confused at the part where it uses: “target”, “…”, and “on”. I’m not really sure if this is a Github Graphql specific thing or a graphql thing as I can’t find anything in the docs about it.

Can someone point me to some docs where I can find information on these?

query {
   repository(name:“hadoop-lzo”, owner:“twitter”){
      ref(qualifiedName:“master”) {
         target {
         … on Commit {
            history(first: 1) {
               edges {
                  node {
                     oid
                  }
               }
            }
         }
      }
   }
}
}

Hey @seongju,

Thanks for being here! Looking at your query I assume you want to list the commits related to the default branch.

Inside the Commitobject, you have the history field which is used to query the list of commits related to a certain branch (i.e: master).

I hope that helps!