graphql-python / graphql-python/graphql-relay-py
[Question] How can I customize the name of the field id is retrieve by?
- Ngôn ngữ chính
- Python
- Star
- 144
- Fork
- 41
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- api
- Loại issue
- Tính năng
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100