strawberry-graphql 0.219.2__py3-none-any.whl → 0.220.0__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.
@@ -69,6 +69,7 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
69
69
  path: str,
70
70
  headers: Optional[List[Tuple[bytes, bytes]]] = None,
71
71
  protocol: str = GRAPHQL_TRANSPORT_WS_PROTOCOL,
72
+ connection_params: dict = {},
72
73
  **kwargs: Any,
73
74
  ):
74
75
  """
@@ -81,6 +82,7 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
81
82
  self.protocol = protocol
82
83
  subprotocols = kwargs.get("subprotocols", [])
83
84
  subprotocols.append(protocol)
85
+ self.connection_params = connection_params
84
86
  super().__init__(application, path, headers, subprotocols=subprotocols)
85
87
 
86
88
  async def __aenter__(self) -> Self:
@@ -99,7 +101,9 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
99
101
  res = await self.connect()
100
102
  if self.protocol == GRAPHQL_TRANSPORT_WS_PROTOCOL:
101
103
  assert res == (True, GRAPHQL_TRANSPORT_WS_PROTOCOL)
102
- await self.send_json_to(ConnectionInitMessage().as_dict())
104
+ await self.send_json_to(
105
+ ConnectionInitMessage(payload=self.connection_params).as_dict()
106
+ )
103
107
  response = await self.receive_json_from()
104
108
  assert response == ConnectionAckMessage().as_dict()
105
109
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.219.2
3
+ Version: 0.220.0
4
4
  Summary: A library for creating GraphQL APIs
5
5
  Home-page: https://strawberry.rocks/
6
6
  License: MIT
@@ -25,7 +25,7 @@ strawberry/channels/handlers/graphql_ws_handler.py,sha256=PHRkwnXt3tY4E0XBVHh4hp
25
25
  strawberry/channels/handlers/http_handler.py,sha256=9pW978XaeF-aFWM9WMaSHCOWmcWoIJCNkW8X3lKJcws,9560
26
26
  strawberry/channels/handlers/ws_handler.py,sha256=sHL44eay4tNoKzkrRn3WewSYH-3ZSJzxJpmBJ-aTkeM,4650
27
27
  strawberry/channels/router.py,sha256=dyOBbSF8nFiygP0zz6MM14mhkvFQAEbbLBXzcpubSHM,1927
28
- strawberry/channels/testing.py,sha256=he9cdsu5KxoPfpR8z2E6kwr2hwUjVhACTrTIoIbsSkQ,5519
28
+ strawberry/channels/testing.py,sha256=IWj1CuIS3vOo2f2fw0W-0GCz-YSs7QSAAscC6suqtiI,5668
29
29
  strawberry/cli/__init__.py,sha256=OkUYNyurO-TyHcD_RsP1bjtNrxlM5gV6Ri6vs4asvvc,374
30
30
  strawberry/cli/app.py,sha256=tTMBV1pdWqMcwjWO2yn-8oLDhMhfJvUzyQtWs75LWJ0,54
31
31
  strawberry/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -241,8 +241,8 @@ strawberry/utils/logging.py,sha256=flS7hV0JiIOEdXcrIjda4WyIWix86cpHHFNJL8gl1y4,7
241
241
  strawberry/utils/operation.py,sha256=Um-tBCPl3_bVFN2Ph7o1mnrxfxBes4HFCj6T0x4kZxE,1135
242
242
  strawberry/utils/str_converters.py,sha256=avIgPVLg98vZH9mA2lhzVdyyjqzLsK2NdBw9mJQ02Xk,813
243
243
  strawberry/utils/typing.py,sha256=Qxz1LwyVsNGV7LQW1dFsaUbsswj5LHBOdKLMom5eyEA,13491
244
- strawberry_graphql-0.219.2.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
245
- strawberry_graphql-0.219.2.dist-info/METADATA,sha256=67eeDV2Vq2M40AKsz3Zi6GuO674V9nwpQIBGOinyZq4,7740
246
- strawberry_graphql-0.219.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
247
- strawberry_graphql-0.219.2.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
248
- strawberry_graphql-0.219.2.dist-info/RECORD,,
244
+ strawberry_graphql-0.220.0.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
245
+ strawberry_graphql-0.220.0.dist-info/METADATA,sha256=VPSyzPbXJPaCJWyTcloRXv5rSQply8Iv453lqySmXY0,7740
246
+ strawberry_graphql-0.220.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
247
+ strawberry_graphql-0.220.0.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
248
+ strawberry_graphql-0.220.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: poetry-core 1.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any