strawberry-graphql 0.233.2__py3-none-any.whl → 0.233.3__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/fields/resolver.py +13 -18
- {strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/RECORD +6 -6
- {strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/entry_points.txt +0 -0
@@ -231,30 +231,25 @@ class StrawberryResolver(Generic[T]):
|
|
231
231
|
@cached_property
|
232
232
|
def arguments(self) -> List[StrawberryArgument]:
|
233
233
|
"""Resolver arguments exposed in the GraphQL Schema."""
|
234
|
-
|
235
|
-
|
236
|
-
populated_reserved_parameters = set(
|
237
|
-
key for key, value in self.reserved_parameters.items() if value is not None
|
238
|
-
)
|
234
|
+
root_parameter = self.reserved_parameters.get(ROOT_PARAMSPEC)
|
235
|
+
parent_parameter = self.reserved_parameters.get(PARENT_PARAMSPEC)
|
239
236
|
|
237
|
+
# TODO: Maybe use SELF_PARAMSPEC in the future? Right now
|
238
|
+
# it would prevent some common pattern for integrations
|
239
|
+
# (e.g. django) of typing the `root` parameters as the
|
240
|
+
# type of the real object being used
|
240
241
|
if (
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
# (e.g. django) of typing the `root` parameters as the
|
246
|
-
# type of the real object being used
|
247
|
-
& {ROOT_PARAMSPEC, PARENT_PARAMSPEC}
|
248
|
-
)
|
249
|
-
) and len(conflicting_arguments) > 1:
|
242
|
+
root_parameter is not None
|
243
|
+
and parent_parameter is not None
|
244
|
+
and root_parameter.name != parent_parameter.name
|
245
|
+
):
|
250
246
|
raise ConflictingArgumentsError(
|
251
247
|
self,
|
252
|
-
[
|
253
|
-
cast(Parameter, self.reserved_parameters[key]).name
|
254
|
-
for key in conflicting_arguments
|
255
|
-
],
|
248
|
+
[root_parameter.name, parent_parameter.name],
|
256
249
|
)
|
257
250
|
|
251
|
+
parameters = self.signature.parameters.values()
|
252
|
+
reserved_parameters = set(self.reserved_parameters.values())
|
258
253
|
missing_annotations: List[str] = []
|
259
254
|
arguments: List[StrawberryArgument] = []
|
260
255
|
user_parameters = (p for p in parameters if p not in reserved_parameters)
|
@@ -224,7 +224,7 @@ strawberry/type.py,sha256=MS2y7VNugCIHkndJmU5V7VZA9QRcmf76JMzP3TH1jws,6587
|
|
224
224
|
strawberry/types/__init__.py,sha256=APb1Cjy6bxqFxIfDfempP6eb9NE3LYDwQ3gX7r07lXI,139
|
225
225
|
strawberry/types/execution.py,sha256=Dz4Y_M1ysKz3UxnBK_-h103DjvP6NwLElXXOEpQCkgw,2783
|
226
226
|
strawberry/types/fields/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
227
|
-
strawberry/types/fields/resolver.py,sha256=
|
227
|
+
strawberry/types/fields/resolver.py,sha256=0gkh6pi_OyhE7qYeDoLIgLk5Q6kvFhD5jIlHjcBWmw0,13980
|
228
228
|
strawberry/types/graphql.py,sha256=3SWZEsa0Zy1eVW6vy75BnB7t9_lJVi6TBV3_1j3RNBs,687
|
229
229
|
strawberry/types/info.py,sha256=b1ZWW_wUop6XrGNcGHKBQeUYjlX-y8u3s2Wm_XhKPYI,3412
|
230
230
|
strawberry/types/nodes.py,sha256=5tTYmxGpVDshbydicHTTBWEiUe8A7p7mdiaSV8Ry80Y,5027
|
@@ -245,8 +245,8 @@ strawberry/utils/logging.py,sha256=flS7hV0JiIOEdXcrIjda4WyIWix86cpHHFNJL8gl1y4,7
|
|
245
245
|
strawberry/utils/operation.py,sha256=Um-tBCPl3_bVFN2Ph7o1mnrxfxBes4HFCj6T0x4kZxE,1135
|
246
246
|
strawberry/utils/str_converters.py,sha256=avIgPVLg98vZH9mA2lhzVdyyjqzLsK2NdBw9mJQ02Xk,813
|
247
247
|
strawberry/utils/typing.py,sha256=G92wuT2WhEGQrwjek_On2K8l0nyVFtBW3P7I_cfjG-8,13870
|
248
|
-
strawberry_graphql-0.233.
|
249
|
-
strawberry_graphql-0.233.
|
250
|
-
strawberry_graphql-0.233.
|
251
|
-
strawberry_graphql-0.233.
|
252
|
-
strawberry_graphql-0.233.
|
248
|
+
strawberry_graphql-0.233.3.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
249
|
+
strawberry_graphql-0.233.3.dist-info/METADATA,sha256=ngYPqqY2aZA0575fAP5OcYlutX8qcVaqGnPPpdzXPjE,7821
|
250
|
+
strawberry_graphql-0.233.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
251
|
+
strawberry_graphql-0.233.3.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
252
|
+
strawberry_graphql-0.233.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.233.2.dist-info → strawberry_graphql-0.233.3.dist-info}/entry_points.txt
RENAMED
File without changes
|