graphql-python / graphql-python/graphql-relay-py
[Question] How can I customize the name of the field id is retrieve by?
- 主要语言
- Python
- 星标
- 144
- 派生
- 41
- PR 合并指标
- 30 天内没有已合并 PR
描述
Im trying to have relay node compose the global id in a custom way for a specific type. Instead of using the id attribute of my object I want it to use the uuid attribute. I know that i can create a custom node class to customize how the id is encoded and decoded: http://docs.graphene-python.org/en/latest/relay/nodes/
but what i want to do Is also customize the name of the field the id is gotten from ... this code suggest that it can be done by passing id_fetcher but i Dont know where or how this function is called https://github.com/graphql-python/graphql-relay-py/blob/master/graphql_relay/node/node.py#L70
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start with graphql_relay/node/node.py around line 70 and the linked Relay node documentation. Trace how id_fetcher is passed and called, then verify whether it can read the uuid attribute for the requested type. Done means documenting or exposing the supported customization path for the field used to build the global ID.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100