graphql-python / graphql-python/graphene-sqlalchemy

Default sort

未關閉
#398 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
Python
星號
985
分支
223
PR 合併指標
30 天內沒有已合併 PR

描述

It would be great if `SQLAlchemyObjectType` allowed to configure a `default_value` of a `#sort_argument` method result.

```python
def sort_argument_for_object_type(
# ...
return Argument(List(enum), default_value=enum.default)
```

Right now there is no way to configure the `default_value` of the `Argument`.

貢獻指南

開啟貢獻指南

研究方向

從 SQLAlchemyObjectType 開始,找到 issue 中描述的 sort_argument 方法,然後檢查其 Argument 是如何建構的。當呼叫端可以為排序結果設定 Argument 的 default_value 時,此變更即完成;issue 未提供測試位置。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
graphql, python, sqlalchemy
領域
api, database
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。