"Decorated type deeper than introspection query" error with nested lists
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu với schema lồng nhau Query.animals và ví dụ resolve_animals của nó, sau đó tái hiện lỗi qua GraphiQL 0.7.1 trong khi kiểm tra response introspection. So sánh trường hợp NonNull/list lồng nhau với các phiên bản loại bỏ NonNull; được xem là hoàn tất khi schema có thể được introspect và GraphiQL không còn báo lỗi decorated-type.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
We see the following errors when using nested lists:
Error: Decorated type deeper than introspection query.
at n (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:23637)
at n (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:23879)
at n (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:23733)
at n (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:23879)
at r (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:24425)
at http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:26609
at http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:11:8480
at Array.reduce (native)
at keyValMap (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:11:8444)
at f (http://cdn.jsdelivr.net/graphiql/0.7.1/graphiql.min.js:15:26484)
Here's the example code that can cause this issue. Graphene introspection doesn't report any errors.
import graphene, json
class Animal(graphene.Interface):
id = graphene.String()
class Dog(graphene.ObjectType):
class Meta:
interfaces = (Animal, )
breed = graphene.String()
class Cat(graphene.ObjectType):
class Meta:
interfaces = (Animal, )
category = graphene.String()
class Query(graphene.ObjectType):
animals = graphene.NonNull(graphene.List(graphene.NonNull(graphene.List(graphene.NonNull(Animal)))))
def resolve_animals(self, args, context, info):
return[[Dog(id=1, breed='Golden Retriever'),
Dog(id=2, breed='German Shepard')],
[Cat(id=11, category ='Tiger'),
Cat(id=12, category='House Cat')]]
schema = graphene.Schema(query=Query, types=[Dog, Cat, ])
Errors disappear if we remove the "required" or NonNull decorators. Any suggestions on how to fix these errors?
- Ngôn ngữ chính
- Python
- Star
- 1.3k
- Fork
- 139
- 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
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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/flask-graphql
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
graphql-python/flask-graphql#92 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
which graphiql version is using? Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
graphql-python/flask-graphql#85 · 2 bình luận · 1 reaction ·
-
CSRF Exemption? Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
graphql-python/flask-graphql#84 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
graphql-python/flask-graphql#80 · 9 bình luận · 2 reaction ·
Tất cả issue của graphql-python/flask-graphql
Issue tương tự
-
essnmx good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
-
[Feature] 奇物选择添加优先级 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
syfoud/Simulated_Scepter#174 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Giskard-AI/giskard-oss#2840 · 1 bình luận ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Đang mởarea: repo bug perceived difficulty: 2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
yeti-platform/yeti#1380 ·