strawberry-graphql 0.237.0__py3-none-any.whl → 0.237.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.
@@ -41,6 +41,7 @@ from strawberry.types.base import StrawberryObjectDefinition, has_object_definit
41
41
  from strawberry.types.graphql import OperationType
42
42
 
43
43
  from ..printer import print_schema
44
+ from ..utils.await_maybe import await_maybe
44
45
  from . import compat
45
46
  from .base import BaseSchema
46
47
  from .config import StrawberryConfig
@@ -349,13 +350,15 @@ class Schema(BaseSchema):
349
350
  root_value: Optional[Any] = None,
350
351
  operation_name: Optional[str] = None,
351
352
  ) -> Union[AsyncIterator[GraphQLExecutionResult], GraphQLExecutionResult]:
352
- return await subscribe(
353
- self._schema,
354
- parse(query),
355
- root_value=root_value,
356
- context_value=context_value,
357
- variable_values=variable_values,
358
- operation_name=operation_name,
353
+ return await await_maybe(
354
+ subscribe(
355
+ self._schema,
356
+ parse(query),
357
+ root_value=root_value,
358
+ context_value=context_value,
359
+ variable_values=variable_values,
360
+ operation_name=operation_name,
361
+ )
359
362
  )
360
363
 
361
364
  def _resolve_node_ids(self) -> None:
@@ -190,7 +190,8 @@ class BaseGraphQLWSHandler(ABC):
190
190
  await self.send_message(GQL_COMPLETE, operation_id, None)
191
191
 
192
192
  async def cleanup_operation(self, operation_id: str) -> None:
193
- await self.subscriptions[operation_id].aclose()
193
+ with suppress(RuntimeError):
194
+ await self.subscriptions[operation_id].aclose()
194
195
  del self.subscriptions[operation_id]
195
196
 
196
197
  self.tasks[operation_id].cancel()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.237.0
3
+ Version: 0.237.1
4
4
  Summary: A library for creating GraphQL APIs
5
5
  Home-page: https://strawberry.rocks/
6
6
  License: MIT
@@ -45,7 +45,7 @@ Requires-Dist: channels (>=3.0.5) ; extra == "channels"
45
45
  Requires-Dist: fastapi (>=0.65.2) ; extra == "fastapi"
46
46
  Requires-Dist: flask (>=1.1) ; extra == "flask"
47
47
  Requires-Dist: graphlib_backport ; (python_version < "3.9") and (extra == "cli")
48
- Requires-Dist: graphql-core (>=3.2.0,<3.3.0)
48
+ Requires-Dist: graphql-core (>=3.2.0,<3.4.0)
49
49
  Requires-Dist: libcst (>=0.4.7) ; extra == "debug" or extra == "debug-server" or extra == "cli"
50
50
  Requires-Dist: litestar (>=2) ; (python_version >= "3.8") and (extra == "litestar")
51
51
  Requires-Dist: opentelemetry-api (<2) ; extra == "opentelemetry"
@@ -183,7 +183,7 @@ strawberry/schema/config.py,sha256=Aa01oqnHb0ZPlw8Ti_O840LxlT827LNio15BQrc37A0,7
183
183
  strawberry/schema/exceptions.py,sha256=rqVNb_oYrKM0dHPgvAemqCG6Um282LPPu4zwQ5cZqs4,584
184
184
  strawberry/schema/execute.py,sha256=74eGjXrptVO_EP-luZmSHUeXtt3Lk5BbEoZv9v7w0jo,10840
185
185
  strawberry/schema/name_converter.py,sha256=tpqw2XCSFvJI-H844iWhE2Z1sKic7DrjIZxt11eJN5Y,6574
186
- strawberry/schema/schema.py,sha256=0zZirswxx5_lryhDTzXpjyDOnjfWuOvWHxkM9ZTyYF4,15789
186
+ strawberry/schema/schema.py,sha256=ySwPFbUWhoo8G6GLZjsF9kxvQ9jGmw8ibYZFOTtwZRU,15896
187
187
  strawberry/schema/schema_converter.py,sha256=lckL2LoxAb6mNfJIVcerht2buzBG573ly3BHyl7wra4,36859
188
188
  strawberry/schema/types/__init__.py,sha256=oHO3COWhL3L1KLYCJNY1XFf5xt2GGtHiMC-UaYbFfnA,68
189
189
  strawberry/schema/types/base_scalars.py,sha256=NTj_tYqWLQLEOPDhBhSE1My4JXoieyg0jO8B6RNK-xA,1913
@@ -208,7 +208,7 @@ strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py,sha256=wN6dk
208
208
  strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py,sha256=P56QgUkiDuwoRHl8WKbtssDShQbgKuMY0FXYAPY6VgE,15133
209
209
  strawberry/subscriptions/protocols/graphql_transport_ws/types.py,sha256=rJQWeNcsHevAuxYYocz4F6DO3PR-IgWF_KYsx5VWN4s,2420
210
210
  strawberry/subscriptions/protocols/graphql_ws/__init__.py,sha256=ijn1A1O0Fzv5p9n-jw3T5H7M3oxbN4gbxRaepN7HyJk,553
211
- strawberry/subscriptions/protocols/graphql_ws/handlers.py,sha256=QeZ0h95T4_SdljE6565qEu9zxh4N6yP-nCtB_QWG55I,7582
211
+ strawberry/subscriptions/protocols/graphql_ws/handlers.py,sha256=zptIxudunKCf-5FEB51n7t7KN0nRzSko6_-ya0gpYD4,7623
212
212
  strawberry/subscriptions/protocols/graphql_ws/types.py,sha256=gYFCHMoRr7ko5lrE7dRITwoRvDmF6w8fFnw04sh-XEI,1009
213
213
  strawberry/test/__init__.py,sha256=U3B5Ng7C_H8GpCpfvgZZcfADMw6cor5hm78gS3nDdMI,115
214
214
  strawberry/test/client.py,sha256=-V_5DakR0NJ_Kd5ww4leIhMnIJ-Pf274HkNqYtGVfl8,6044
@@ -248,8 +248,8 @@ strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,7
248
248
  strawberry/utils/operation.py,sha256=SSXxN-vMqdHO6W2OZtip-1z7y4_A-eTVFdhDvhKeLCk,1193
249
249
  strawberry/utils/str_converters.py,sha256=KGd7QH90RevaJjH6SQEkiVVsb8KuhJr_wv5AsI7UzQk,897
250
250
  strawberry/utils/typing.py,sha256=tUHHX2YTGX417EEQHB6j0B8-p-fg31ZI8csc9SUoq2I,14260
251
- strawberry_graphql-0.237.0.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
252
- strawberry_graphql-0.237.0.dist-info/METADATA,sha256=9up1eJlJS-ceE-TwqJp_j7_SXzOZywH7AKti84ylLG4,7821
253
- strawberry_graphql-0.237.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
254
- strawberry_graphql-0.237.0.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
255
- strawberry_graphql-0.237.0.dist-info/RECORD,,
251
+ strawberry_graphql-0.237.1.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
252
+ strawberry_graphql-0.237.1.dist-info/METADATA,sha256=_E8wmtdiW7S9ZTA40IsCxT-AweMtTFdvEDef4ODdQig,7821
253
+ strawberry_graphql-0.237.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
254
+ strawberry_graphql-0.237.1.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
255
+ strawberry_graphql-0.237.1.dist-info/RECORD,,