strawberry-graphql 0.236.2__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.
- strawberry/ext/mypy_plugin.py +7 -2
- strawberry/schema/schema.py +10 -7
- strawberry/subscriptions/protocols/graphql_ws/handlers.py +2 -1
- {strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/METADATA +2 -2
- {strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/RECORD +8 -8
- {strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/entry_points.txt +0 -0
strawberry/ext/mypy_plugin.py
CHANGED
@@ -474,8 +474,13 @@ def strawberry_pydantic_class_callback(ctx: ClassDefContext) -> None:
|
|
474
474
|
else:
|
475
475
|
extra = {}
|
476
476
|
|
477
|
-
if PYDANTIC_VERSION
|
478
|
-
|
477
|
+
if PYDANTIC_VERSION:
|
478
|
+
if PYDANTIC_VERSION >= (2, 7, 0):
|
479
|
+
extra["api"] = ctx.api
|
480
|
+
if PYDANTIC_VERSION >= (2, 8, 0):
|
481
|
+
# Based on pydantic's default value
|
482
|
+
# https://github.com/pydantic/pydantic/pull/9606/files#diff-469037bbe55bbf9aa359480a16040d368c676adad736e133fb07e5e20d6ac523R1066
|
483
|
+
extra["force_typevars_invariant"] = False
|
479
484
|
|
480
485
|
add_method(
|
481
486
|
ctx,
|
strawberry/schema/schema.py
CHANGED
@@ -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
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
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
|
-
|
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.
|
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.
|
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"
|
@@ -95,7 +95,7 @@ strawberry/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
95
95
|
strawberry/ext/dataclasses/LICENSE,sha256=WZgm35K_3NJwLqxpEHJJi7CWxVrwTumEz5D3Dtd7WnA,13925
|
96
96
|
strawberry/ext/dataclasses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
97
97
|
strawberry/ext/dataclasses/dataclasses.py,sha256=fshCPQm1o4q1AwzmQzdlBIQ_JUNnwSlvBfsLZ0zIHuk,2299
|
98
|
-
strawberry/ext/mypy_plugin.py,sha256=
|
98
|
+
strawberry/ext/mypy_plugin.py,sha256=AO4Cw55V8mcMtsKsIyGZkAAmeNprlvzR8NVL2CNAYnc,20098
|
99
99
|
strawberry/extensions/__init__.py,sha256=SZ-YEMnxAzoDZFo-uHXMHOaY_PPkYm1muPpK4ccJ3Xk,1248
|
100
100
|
strawberry/extensions/add_validation_rules.py,sha256=abkOaXG-unAZj2xL2sspeUXpZKBCpj5Kr5h7TreN4gM,1338
|
101
101
|
strawberry/extensions/base_extension.py,sha256=pQdN06K14dtWl_nxCIE4DBbGaB6mzxvidRdwNcDwZj8,2068
|
@@ -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=
|
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=
|
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.
|
252
|
-
strawberry_graphql-0.
|
253
|
-
strawberry_graphql-0.
|
254
|
-
strawberry_graphql-0.
|
255
|
-
strawberry_graphql-0.
|
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,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.236.2.dist-info → strawberry_graphql-0.237.1.dist-info}/entry_points.txt
RENAMED
File without changes
|