bangumi / bangumi/server-private
GraphQL 查询 subject relations 缺失
- Dominant language
- TypeScript
- Stars
- 42
- Forks
- 23
- Avg merge
- 13h 56m
- Merged PRs (30d)
- 19
Description
https://api.bgm.tv/v0/graphql
```graphql
query BatchGetSubjectQuery {
s0:subject(id: 407573) {
relations {
relation
subject{id}
order
}
}
}
```
### Actual response
只有一个关联条目 (小说)
```
{
"data": {
"s0": {
"relations": [
{
"relation": 1,
"subject": {
"id": 124785
},
"order": 0
}
]
}
}
}
```
### Expected
Bangumi 网站上有很多: https://bangumi.tv/subject/407573

Archive 的数据库里也有很多
```jsonlines
{"subject_id":407573,"relation_type":1,"related_subject_id":124785,"order":0}
{"subject_id":407573,"relation_type":1,"related_subject_id":130998,"order":0}
{"subject_id":407573,"relation_type":2,"related_subject_id":302523,"order":0}
{"subject_id":407573,"relation_type":3003,"related_subject_id":470755,"order":1}
{"subject_id":407573,"relation_type":3004,"related_subject_id":481720,"order":1}
{"subject_id":407573,"relation_type":1,"related_subject_id":492033,"order":0}
{"subject_id":407573,"relation_type":3004,"related_subject_id":498336,"order":2}
{"subject_id":407573,"relation_type":3003,"related_subject_id":500572,"order":2}
{"subject_id":407573,"relation_type":3001,"related_subject_id":515413,"order":0}
{"subject_id":407573,"relation_type":3,"related_subject_id":515594,"order":0}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the supplied BatchGetSubjectQuery against https://api.bgm.tv/v0/graphql for subject 407573, then compare its relations with the Bangumi page and the listed Archive records. Trace the subject relations resolver or entry point exposed by the v0 GraphQL API. Done means the query returns all expected related subjects with their relation types and order values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100