We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1569764 commit 47a5e94Copy full SHA for 47a5e94
tests/test_registry.py
@@ -58,3 +58,20 @@ def test_register_object_field_and_get_for_graphene_field():
58
field = r.get_object_field_for_graphene_field(GraphFoo, "name")
59
assert field is not None
60
assert field.annotation == str
61
+
62
63
+def test_register_object_field_nested_model():
64
+ """https://github.com/graphql-python/graphene-pydantic/issues/104"""
65
66
+ class A(BaseModel):
67
+ x: str | None = None
68
+ y: list["A"] | None = None
69
70
+ class P_A(PydanticInputObjectType):
71
+ class Meta:
72
+ model = A
73
74
+ try:
75
+ P_A.resolve_placeholders()
76
+ except TypeError as e:
77
+ assert False, f"'10 / 5' raised an exception: {e}"
0 commit comments