为 GraphQL 查询、修改添加错误信息。
{
"data": { },
"errors": [
{
"type": "NOT_FOUND",
"path": [
"user"
],
"locations": [
{
"line": 12,
"column": 3
}
],
"message": "Could not resolve to a User with the login of 'excing00'."
},
{
"type": "NOT_FOUND",
"path": [
"repository"
],
"locations": [
{
"line": 23,
"column": 3
}
],
"message": "Could not resolve to a Repository with the name 'excing/ccc'."
}
]
}
如上。
为 GraphQL 查询、修改添加错误信息。
{ "data": { }, "errors": [ { "type": "NOT_FOUND", "path": [ "user" ], "locations": [ { "line": 12, "column": 3 } ], "message": "Could not resolve to a User with the login of 'excing00'." }, { "type": "NOT_FOUND", "path": [ "repository" ], "locations": [ { "line": 23, "column": 3 } ], "message": "Could not resolve to a Repository with the name 'excing/ccc'." } ] }如上。