PID Graph GraphQL Example Software Versions

User story

As a software author, I want to able to see the citations of my software aggregated across all versions. so that I see a complete picture of reuse.

Query strategy

Using a DOI for software with both citations and versions, we show the citation counts both for the parent DOI and all versions, using the hasVersion/isVersionOf relation types.

Why GraphQL

This is a use case that came up a lot in our initial discussions about the PID Graph, and GraphQL is a good fit.

In this particular example we see that the version number is the same (v1.0) for the parent DOI, and the version we found, and both have an identical citation count.

Use the following query in the GraphQL client at https://api.datacite.org/graphql

{
  software(id: "https://doi.org/10.5281/zenodo.2799488") {
    id
    titles {
      title
    }
    version
    versionCount
    versionOfCount
    citationCount
    versions {
      nodes {
        id
        titles {
          title
        }
        version
        versionCount
        versionOfCount
        citationCount
      }
    }
  }
}

Related GitHub issue from 2018 FREYA workshop:

I checked a bunch of software records from Zenodo. Not all versions have the same citation information. Also, if I take this record as an example, when I use the concept DOI (as you also did in the example you used above) I get info about that and also the latest version. If you query using the DOI of a version and not the concept DOI, you only get information for that version. In the same example, version 1.1.0 has the citation information but the query returns "citationCount": 0.

@artemislav the way the query is structured, you always start with the “concept DOI”. you could use versionOf instead of versions to include citations for the “concept DOI” when starting from a specific version.

Something is not right with citationCount, I need to look into that.