我正在使用 Github 的 GraphQL (v4) API 进行一些调用。我正在尝试获取有关存储库的提交信息,但是在定义对象连接的since
属性时遇到了问题。history
Commit
我收到以下错误:
{
"data": null,
"errors": [
{
"message": "Argument 'since' on Field 'history' has an invalid value. Expected type 'GitTimestamp'.",
"locations": [
{
"line": 38,
"column": 9
}
]
}
]
}
这是导致错误的 GraphQL 的提取部分:
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
}
}
}
}
}
}
}
}
}
}
}
}
根据文档,GitTimestamp
标量是ISO-8601编码的日期字符串。那么,我的字符串有什么问题"2017-07-15"
?我还尝试了以下字符串,但都没有奏效。
- 2017/01/01
- 2017.01.01
- 2017-01-01 01:01
- 2017-01-01T01:01
- 2017-01-01 01:01Z
- 2017-01-01T01:01Z