Consider sharing implementation with graphene-django
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python, sqlalchemy
- Lĩnh vực
- backend-api-design, databases
Hướng nghiên cứu
Bắt đầu bằng cách so sánh phần triển khai trùng lặp trong graphene-django và graphene-sqlalchemy, sau đó xem xét các issue được liên kết về overfetching, quyền, filtering và các truy vấn N+1. Công việc được xem là hoàn tất khi đạt được thống nhất về ranh giới của một thư viện dùng chung và kế hoạch cho các tích hợp dành riêng cho ORM; issue không nêu tệp, test hay entry point nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
I was surprised to see that graphene-django shares a considerable amount of code with this library. Almost line-for-line in some instances if you blur your eyes to the types. Unfortunately that means it also shares some common bugs, missing features, etc...
Worse-off for this library, the graphene "team" seems to prefer graphene-django by a 3-0 vote. Which might explain why that package has additional features over this one 😉. Not to mention, there also several graphene-django-* packages that tack on to grpahene-django[1]
Both libraries essentially represent the same thing: gluing your Python SQL ORM into graphene types. (Note that these aren't the only players on the field either [2])
Proposal
Find the middle ground for "here's how to take a declarative ORM and transform it into graphene types", and have graphene-django and graphene-sqlalchemy fill in the ORM-specific slots (how do I convert this ORM field type to a graphene field type?, etc...) and add additional features offered by that ORM.
This means that contributors who can bring valuable graphene expertise can contribute without heavy knowledge of an ORM, and aren't splintered across repos. Valuable features can be added to a single scaffold repo and then be filled by the implementation-specific repos much easier.
It would also mean core features/issues are located in one library.
I've outlined below (what I think) the key features that a shared library should attempt to solve, in addition to reducing the amount code copied between the two libraries.
Similar issues/features
| Description | django issue | sqlalchemy issue |
|---|---|---|
| don't overfetch data | 402 | 134 |
| field/node level permissions | 485 | 186 |
| filtering | supported | 110, 16 |
| N+1 | graphene-django-optimizer |
35 |
(there's more issues/features duplicated between the two, but those are the "big ones" IMO that stop these libraries form being true works of art)
drawbacks
With maintenance being scattered, it might be hard to find the right people to create/maintain such a library. Furthermore, maintenance/contributions would need to generic enough to satisfy several downstream libraries. However, from what I've seen scouring the issues and related libraries, there's no shortage of people willing to solve the hard problems. 👍
notable parties
@syrusakbary @jnak @Nabellaleen @Cito @patrick91 (plus whoever else y'all wanna tag)
[1] graphene-django-tools, graphene-django-optimizer, etc...
[2] @coleifer who authored Peewee showed interest in support (graphene#289) but recently said it wasn't being pursued (peewee#1790)
- Ngôn ngữ chính
- Python
- Star
- 985
- Fork
- 224
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của graphql-python/graphene-sqlalchemy
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
graphql-python/graphene-sqlalchemy#422 · 1 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
graphql-python/graphene-sqlalchemy#419 · 3 bình luận ·
Tất cả issue của graphql-python/graphene-sqlalchemy
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
anthropics/skills#1811 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
speaches-ai/speaches#678 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
datalayer/mcp-compose#42 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
conda-forge/spacy-feedstock#177 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
UKGovernmentBEIS/inspect_evals#2523 ·