strawberry-graphql 0.289.3__py3-none-any.whl → 0.289.4__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/relay/fields.py +6 -2
- {strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/RECORD +6 -6
- {strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/entry_points.txt +0 -0
- {strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/licenses/LICENSE +0 -0
strawberry/relay/fields.py
CHANGED
|
@@ -41,6 +41,7 @@ from strawberry.types.cast import cast as strawberry_cast
|
|
|
41
41
|
from strawberry.types.field import _RESOLVER_TYPE, StrawberryField, field
|
|
42
42
|
from strawberry.types.fields.resolver import StrawberryResolver
|
|
43
43
|
from strawberry.types.lazy_type import LazyType
|
|
44
|
+
from strawberry.types.unset import UNSET
|
|
44
45
|
from strawberry.utils.aio import asyncgen_to_list
|
|
45
46
|
from strawberry.utils.typing import eval_type, is_generic_alias, is_optional, is_union
|
|
46
47
|
|
|
@@ -375,9 +376,12 @@ if TYPE_CHECKING:
|
|
|
375
376
|
node = field
|
|
376
377
|
else:
|
|
377
378
|
|
|
378
|
-
def node(*args: Any, **kwargs: Any) -> StrawberryField:
|
|
379
|
+
def node(*args: Any, default: Any = UNSET, **kwargs: Any) -> StrawberryField:
|
|
379
380
|
kwargs["extensions"] = [*kwargs.get("extensions", []), NodeExtension()]
|
|
380
|
-
|
|
381
|
+
# The default value is a stub for dataclasses so you can instantiate
|
|
382
|
+
# types with relay.node() fields without explicit initialization.
|
|
383
|
+
# The actual value is resolved by the NodeExtension resolver.
|
|
384
|
+
return field(*args, default=default, **kwargs)
|
|
381
385
|
|
|
382
386
|
|
|
383
387
|
# we used to have `Type[Connection[NodeType]]` here, but that when we added
|
|
@@ -162,7 +162,7 @@ strawberry/quart/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
162
162
|
strawberry/quart/views.py,sha256=g0rs3UwFmqxt1DDZpAUF8qHIpT_g-AYwO-t8K-V3AE4,6680
|
|
163
163
|
strawberry/relay/__init__.py,sha256=Vi4btvA_g6Cj9Tk_F9GCSegapIf2WqkOWV8y3P0cTCs,553
|
|
164
164
|
strawberry/relay/exceptions.py,sha256=Bk9pPFbb28tDjUiydHa-tFl-e01XukxmJeWoWT9L17M,4017
|
|
165
|
-
strawberry/relay/fields.py,sha256=
|
|
165
|
+
strawberry/relay/fields.py,sha256=qn7dcZfDeZ6EhRn27pOto2bJrlbjTZwl9I_9E6IPIgw,18697
|
|
166
166
|
strawberry/relay/types.py,sha256=-yJ_jpGKPH_CNycWPmXMyn7GjN3MbDcWYvb0dt2VD2Y,30340
|
|
167
167
|
strawberry/relay/utils.py,sha256=ARuQfTNKiIFztaqUYHQs74Wfx-075udJ7NGDeTHUFB8,5541
|
|
168
168
|
strawberry/resolvers.py,sha256=j2sIi-jI2PrnO3if202l8VBuwQQxblPgRupEaDUu-lA,287
|
|
@@ -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.4.dist-info/METADATA,sha256=RKzToLiQvFgIz3_1ZbGZARBZSHFdfsJYKKALngOWCWI,7394
|
|
244
|
+
strawberry_graphql-0.289.4.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
245
|
+
strawberry_graphql-0.289.4.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
|
246
|
+
strawberry_graphql-0.289.4.dist-info/licenses/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
|
247
|
+
strawberry_graphql-0.289.4.dist-info/RECORD,,
|
|
File without changes
|
{strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{strawberry_graphql-0.289.3.dist-info → strawberry_graphql-0.289.4.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|