bangumi / server-private

HTTP sever for private api
11 stars 11 forks source link

[BUG]: GraphQL: Unknown type at index 2 while unserializing payload #808

Closed Him188 closed 4 days ago

Him188 commented 4 weeks ago

https://bangumi.tv/subject/332418 网站可以打开, 但是 graphql 查不了这个条目

Request:

https://api.bgm.tv/v0/graphql

query Q {
  subject(id: 332418){id}
}

Response:

{
  "errors": [
    {
      "message": "Unknown type at index 2 while unserializing payload",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "subject"
      ]
    }
  ],
  "data": {
    "subject": null
  }
}

相邻的 332417 也查不了, 一样的错误, 但是 332416 可以

trim21 commented 4 weeks ago

看样子是用户 tag 解析的问题,目前没有 tag 的条目是个空字符串,解析之前应该先检查 buffer 长度。