strawberry-graphql 0.284.0__py3-none-any.whl → 0.284.1__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.
Potentially problematic release.
This version of strawberry-graphql might be problematic. Click here for more details.
- strawberry/types/maybe.py +10 -0
- {strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/RECORD +6 -6
- {strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/entry_points.txt +0 -0
- {strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/licenses/LICENSE +0 -0
strawberry/types/maybe.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
import typing
|
|
2
3
|
from typing import TYPE_CHECKING, Any, Generic, TypeAlias, TypeVar, Union
|
|
3
4
|
|
|
@@ -36,7 +37,16 @@ else:
|
|
|
36
37
|
class Maybe(Generic[T]): ...
|
|
37
38
|
|
|
38
39
|
|
|
40
|
+
_maybe_re = re.compile(r"^(?:strawberry\.)?Maybe\[(.+)\]$")
|
|
41
|
+
|
|
42
|
+
|
|
39
43
|
def _annotation_is_maybe(annotation: Any) -> bool:
|
|
44
|
+
if isinstance(annotation, str):
|
|
45
|
+
# Ideally we would try to evaluate the annotation, but the args inside
|
|
46
|
+
# may still not be available, as the module is still being constructed.
|
|
47
|
+
# Checking for the pattern should be good enough for now.
|
|
48
|
+
return _maybe_re.match(annotation) is not None
|
|
49
|
+
|
|
40
50
|
return (orig := typing.get_origin(annotation)) and orig is Maybe
|
|
41
51
|
|
|
42
52
|
|
|
@@ -216,7 +216,7 @@ strawberry/types/fields/resolver.py,sha256=8MTBItygqpfowwdpYcPugrOTOcted-tUkLG8O
|
|
|
216
216
|
strawberry/types/graphql.py,sha256=gXKzawwKiow7hvoJhq5ApNJOMUCnKmvTiHaKY5CK1Lw,867
|
|
217
217
|
strawberry/types/info.py,sha256=F-1AwVvxHEs2KF9Nw7dCML_Qx3B-iGu4tsYGQ16cK3k,4891
|
|
218
218
|
strawberry/types/lazy_type.py,sha256=dlP9VcMjZc9sdgriiQGzOZa0TToB6Ee7zpIP8h7TLC0,5079
|
|
219
|
-
strawberry/types/maybe.py,sha256=
|
|
219
|
+
strawberry/types/maybe.py,sha256=ybrXFlUzR5INx6r9BBjdF5_wxR6yR9z03utIb74Luao,1521
|
|
220
220
|
strawberry/types/mutation.py,sha256=xbHRMt1DApU0-zLtowYAHhtiUW8D0q786QdLQkIV9g8,11938
|
|
221
221
|
strawberry/types/nodes.py,sha256=RwZB43OT9BS3Cqjgq4AazqOfyq_y0GD2ysC86EDBv5U,5134
|
|
222
222
|
strawberry/types/object_type.py,sha256=XXAOH31KjHQ8-kVRplADGGhgixV99c1fu_1IdL9opvo,15321
|
|
@@ -236,8 +236,8 @@ strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,7
|
|
|
236
236
|
strawberry/utils/operation.py,sha256=ZgVOw3K2jQuLjNOYUHauF7itJD0QDNoPw9PBi0IYf6k,1234
|
|
237
237
|
strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
|
|
238
238
|
strawberry/utils/typing.py,sha256=PbSNOU73U9rfyJE84E_Dl1i44weiOmdBYATI8DIbUFc,11857
|
|
239
|
-
strawberry_graphql-0.284.
|
|
240
|
-
strawberry_graphql-0.284.
|
|
241
|
-
strawberry_graphql-0.284.
|
|
242
|
-
strawberry_graphql-0.284.
|
|
243
|
-
strawberry_graphql-0.284.
|
|
239
|
+
strawberry_graphql-0.284.1.dist-info/METADATA,sha256=vteJtbEB-as_r5qPE-CQGYT_dNic--H74OhEW2HHRK0,7653
|
|
240
|
+
strawberry_graphql-0.284.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
241
|
+
strawberry_graphql-0.284.1.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
|
242
|
+
strawberry_graphql-0.284.1.dist-info/licenses/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
|
243
|
+
strawberry_graphql-0.284.1.dist-info/RECORD,,
|
|
File without changes
|
{strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{strawberry_graphql-0.284.0.dist-info → strawberry_graphql-0.284.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|