0xPlaygrounds / 0xPlaygrounds/subgrounds

Effectively deep-freeze Query objects

Đang mở
#38 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement internal
Ngôn ngữ chính
Python
Star
73
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**Is your feature request related to a problem? Please describe.**
`subgrounds/query.py` has all objects related to the AST of GraphQL. Currently, every object is frozen, but nested fields of said objects are not (such as nested `list`s and `dict`s). This means the greater objects of `Document`, etc are **not** hashable.

**Describe the solution you'd like**
Ensure all query objects are hashable by using immutable data structures.

**Additional context**
Likely should be considered with a general refactor / subpackage breakdown of `subgrounds/query.py`).

**Implementation checklist**
- [ ] Task 1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The issue is about making query objects in subgrounds/query.py hashable by ensuring nested structures are immutable. Start by examining the AST classes in that file, focusing on how lists and dicts are currently stored. Look into using tuple and types.MappingProxyType or implementing __hash__ methods. Check if there are existing tests for hashing or freezing behavior to understand the expected outcome.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
graphql, python
Lĩnh vực
api, backend
Loại issue
Tái cấu trúc
Độ 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
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.