diff --git a/api/article.go b/api/article.go index 4aeb410..4b9a527 100644 --- a/api/article.go +++ b/api/article.go @@ -82,7 +82,7 @@ var ArticleItems = &graphql.Field{ "tags": &graphql.ArgumentConfig{Type: graphql.String, Description: "筛选文章中含有指定标签的"}, "create_time": &graphql.ArgumentConfig{Type: graphql.DateTime, Description: "筛选文章中创建时间等于指定值的"}, "update_time": &graphql.ArgumentConfig{Type: graphql.DateTime, Description: "筛选文章中更新时间等于指定值的"}, - "sort": &graphql.ArgumentConfig{Type: graphql.String, Description: "按指定字段排序游戏", DefaultValue: "id"}, + "sort": &graphql.ArgumentConfig{Type: graphql.String, Description: "按指定字段排序", DefaultValue: "id"}, "order": &graphql.ArgumentConfig{Type: orderType, Description: "排序类型(升序或降序)", DefaultValue: "ASC"}, "first": &graphql.ArgumentConfig{Type: graphql.Int, Description: "翻页参数(傳回清單中的前n個元素)"}, "last": &graphql.ArgumentConfig{Type: graphql.Int, Description: "翻页参数(傳回清單中的最後n個元素)"}, diff --git a/api/collect.go b/api/collect.go index d558b3c..b19360a 100644 --- a/api/collect.go +++ b/api/collect.go @@ -63,6 +63,8 @@ var CollectionItems = &graphql.Field{ "type": &graphql.ArgumentConfig{Type: graphql.Int, Description: "筛选收藏中含有指定类型的"}, "create_time": &graphql.ArgumentConfig{Type: graphql.DateTime, Description: "筛选收藏中创建时间等于指定值的"}, "update_time": &graphql.ArgumentConfig{Type: graphql.DateTime, Description: "筛选收藏中更新时间等于指定值的"}, + "sort": &graphql.ArgumentConfig{Type: graphql.String, Description: "按指定字段排序", DefaultValue: "id"}, + "order": &graphql.ArgumentConfig{Type: orderType, Description: "排序类型(升序或降序)", DefaultValue: "ASC"}, "first": &graphql.ArgumentConfig{Type: graphql.Int, Description: "翻页参数(傳回清單中的前n個元素)"}, "last": &graphql.ArgumentConfig{Type: graphql.Int, Description: "翻页参数(傳回清單中的最後n個元素)"}, "after": &graphql.ArgumentConfig{Type: graphql.String, Description: "翻页参数(傳回清單中指定遊標之後的元素)"},