diff --git a/api/graphql.go b/api/graphql.go index b98792c..510e2c0 100644 --- a/api/graphql.go +++ b/api/graphql.go @@ -485,7 +485,7 @@ func NewSchema(config Config) (graphql.Schema, error) { SELECT JSON_ARRAYAGG(web_images.id) AS json_result FROM web_fans INNER JOIN web_images ON web_images.user_id = web_fans.blogger_id - WHERE web_fans.follower_id = ? + WHERE web_fans.follower_id = ? AND web_images.article_id IS NOT NULL `, args.Follower).Scan(&item).Error; err != nil { fmt.Println("获取关注列表失败", err) return nil, err @@ -567,7 +567,7 @@ func NewSchema(config Config) (graphql.Schema, error) { // 存在外部筛选条件 if len(id_list) > 0 && len(list) > 0 { - query = query.Where("id IN ?", list) + query = query.Where("id IN ?", list).Where("article_id IS NOT NULL") } for index, item := range LoadItem(p.Info.FieldASTs[0].SelectionSet.Selections) {