strawberry-graphql 0.289.4__py3-none-any.whl → 0.289.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- strawberry/types/union.py +8 -0
- {strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/RECORD +6 -6
- {strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/entry_points.txt +0 -0
- {strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/licenses/LICENSE +0 -0
strawberry/types/union.py
CHANGED
|
@@ -206,6 +206,14 @@ class StrawberryUnion(StrawberryType):
|
|
|
206
206
|
else:
|
|
207
207
|
return_type = None
|
|
208
208
|
|
|
209
|
+
# If we couldn't resolve from type matching, try using is_type_of
|
|
210
|
+
if return_type is None:
|
|
211
|
+
for inner_type in type_.types:
|
|
212
|
+
if inner_type.is_type_of is not None and inner_type.is_type_of(
|
|
213
|
+
root, info
|
|
214
|
+
):
|
|
215
|
+
return inner_type.name
|
|
216
|
+
|
|
209
217
|
# Make sure the found type is expected by the Union
|
|
210
218
|
if return_type is None or return_type not in type_.types:
|
|
211
219
|
raise UnallowedReturnTypeForUnion(
|
|
@@ -227,7 +227,7 @@ strawberry/types/object_type.py,sha256=CTBVBM7wD4y76lC_2mTFnpdTqADEA7nFIRrF93Uhv
|
|
|
227
227
|
strawberry/types/private.py,sha256=DhJs50XVGtOXlxWZFkRpMxQ5_6oki0-x_WQsV1bGUxk,518
|
|
228
228
|
strawberry/types/scalar.py,sha256=OgWRFV5x-qTM4-FJC-sAKix-DhMtGRrJTxU7ry4VOlA,8651
|
|
229
229
|
strawberry/types/type_resolver.py,sha256=fH2ZOK4dAGgu8AMPi-JAXe_kEAbvvw2MCYXqbpx-kTc,6529
|
|
230
|
-
strawberry/types/union.py,sha256=
|
|
230
|
+
strawberry/types/union.py,sha256=u3BXW1NNmgnO6VSTpXWqwo_V47_P1p7WA6VRYqj8cSA,10517
|
|
231
231
|
strawberry/types/unset.py,sha256=7DVK-WWxVLo41agvavTvIbphE42BmY8UpGolXfasIvw,1682
|
|
232
232
|
strawberry/utils/__init__.py,sha256=wuuNvKjcMfE0l4lqrlC-cc0_SR4hV19gNBJ3Mcn7l3A,141
|
|
233
233
|
strawberry/utils/aio.py,sha256=Nc-h2siURQKTUER3olm1ltOn2wd7ZehQ1FDICYOeboI,2201
|
|
@@ -240,8 +240,8 @@ strawberry/utils/logging.py,sha256=Dnivjd0ZhK_lAvjvuyCDkEWDhuURBoK9d3Kt_mIqbRg,7
|
|
|
240
240
|
strawberry/utils/operation.py,sha256=Qs3ttbuC415xEVqmJ6YsWQpJNUo8CZJq9AoMB-yV65w,1215
|
|
241
241
|
strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
|
|
242
242
|
strawberry/utils/typing.py,sha256=eE9NeMfASeXRstbjLnQFfOPymcSX8xwg3FGw_HCp95E,11828
|
|
243
|
-
strawberry_graphql-0.289.
|
|
244
|
-
strawberry_graphql-0.289.
|
|
245
|
-
strawberry_graphql-0.289.
|
|
246
|
-
strawberry_graphql-0.289.
|
|
247
|
-
strawberry_graphql-0.289.
|
|
243
|
+
strawberry_graphql-0.289.5.dist-info/METADATA,sha256=xxAghPw6aK0I3sFAcrz_taj0aGZ4lwFlj-DZaL2cuuA,7394
|
|
244
|
+
strawberry_graphql-0.289.5.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
245
|
+
strawberry_graphql-0.289.5.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
|
246
|
+
strawberry_graphql-0.289.5.dist-info/licenses/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
|
247
|
+
strawberry_graphql-0.289.5.dist-info/RECORD,,
|
|
File without changes
|
{strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{strawberry_graphql-0.289.4.dist-info → strawberry_graphql-0.289.5.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|