I am using Github's GraphQL (v4) API to make some calls. I am trying to get commits information about a repository, but I am having issues with defining the since
attribute of the history
connection of the Commit
object.
I am getting the following error back:
{
"data": null,
"errors": [
{
"message": "Argument 'since' on Field 'history' has an invalid value. Expected type 'GitTimestamp'.",
"locations": [
{
"line": 38,
"column": 9
}
]
}
]
}
And this is the extracted part of my GraphQL which is causing the error:
query {
search(query:"is:public", type:REPOSITORY, first:10){
edges{
node{
... on Repository{
ref(qualifiedName: "master"){
target{
... on Commit{
history(first: 10, since:"2017-07-15"){
totalCount
pageInfo{
startCursor
endCursor
}
edges{
node{
... on Commit{
committedDate
}
}
}
}
}
}
}
}
}
}
}
}
According to the documentation, the GitTimestamp
scalar is an ISO-8601 encoded date string. So, what is the problem with my string "2017-07-15"
? I have also tried the following strings, which none worked.
- 2017/01/01
- 2017.01.01
- 2017-01-01 01:01
- 2017-01-01T01:01
- 2017-01-01 01:01Z
- 2017-01-01T01:01Z