I need to find all data publications of a certain institution and of a certain publication year. The DataCite support was kind enough to provide me with some GraphQL magic for the institution. I tried to extend that so that it also filters one year but I failed. What I have is:
query ($numWorks: Int, $cursor: String, $year: Int) {
organization(id: "xxxxxxx") {
id
name
[…]
works(
first: $numWorks
after: $cursor
) {
...WorkConnectionFragment
nodes {
...WorkFragment
__typename
}
__typename
}
__typename
}
}
fragment WorkConnectionFragment on WorkConnectionWithTotal {
[…]
}
fragment WorkFragment on Work {
id
doi
[…]
publicationYear
[…]
}
Where do I attach the $year
variable to and how?