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.
@@ -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
- parameters = self.signature.parameters.values()
235
- reserved_parameters = set(self.reserved_parameters.values())
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
- conflicting_arguments := (
242
- populated_reserved_parameters
243
- # TODO: Maybe use SELF_PARAMSPEC in the future? Right now
244
- # it would prevent some common pattern for integrations
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.233.2
3
+ Version: 0.233.3
4
4
  Summary: A library for creating GraphQL APIs
5
5
  Home-page: https://strawberry.rocks/
6
6
  License: MIT
@@ -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=F_E8bmvYM-3hjkTMMtI1a0qs8raMOpYidh27uny5Hc4,14153
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.2.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
249
- strawberry_graphql-0.233.2.dist-info/METADATA,sha256=PMM-_LyQUFQzVGt86DPrHnY_looZPK6RB5I8VUMH6AQ,7821
250
- strawberry_graphql-0.233.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
251
- strawberry_graphql-0.233.2.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
252
- strawberry_graphql-0.233.2.dist-info/RECORD,,
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,,