strawberry-graphql 0.235.1__py3-none-any.whl → 0.235.2__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/flask/views.py +2 -2
- strawberry/http/base.py +2 -7
- strawberry/http/types.py +2 -2
- strawberry/sanic/views.py +1 -7
- {strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/RECORD +9 -9
- {strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/entry_points.txt +0 -0
strawberry/flask/views.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import warnings
|
4
|
-
from typing import TYPE_CHECKING, Any,
|
4
|
+
from typing import TYPE_CHECKING, Any, Mapping, Optional, Union, cast
|
5
5
|
|
6
6
|
from flask import Request, Response, render_template_string, request
|
7
7
|
from flask.views import View
|
@@ -26,7 +26,7 @@ class FlaskHTTPRequestAdapter(SyncHTTPRequestAdapter):
|
|
26
26
|
self.request = request
|
27
27
|
|
28
28
|
@property
|
29
|
-
def query_params(self) ->
|
29
|
+
def query_params(self) -> QueryParams:
|
30
30
|
return self.request.args.to_dict()
|
31
31
|
|
32
32
|
@property
|
strawberry/http/base.py
CHANGED
@@ -4,7 +4,7 @@ from typing_extensions import Protocol
|
|
4
4
|
|
5
5
|
from strawberry.http import GraphQLHTTPResponse
|
6
6
|
from strawberry.http.ides import GraphQL_IDE, get_graphql_ide_html
|
7
|
-
from strawberry.http.types import HTTPMethod
|
7
|
+
from strawberry.http.types import HTTPMethod, QueryParams
|
8
8
|
|
9
9
|
from .exceptions import HTTPException
|
10
10
|
from .typevars import Request
|
@@ -50,17 +50,12 @@ class BaseView(Generic[Request]):
|
|
50
50
|
def encode_json(self, response_data: GraphQLHTTPResponse) -> str:
|
51
51
|
return json.dumps(response_data)
|
52
52
|
|
53
|
-
def parse_query_params(
|
54
|
-
self, params: Mapping[str, Optional[Union[str, List[str]]]]
|
55
|
-
) -> Dict[str, Any]:
|
53
|
+
def parse_query_params(self, params: QueryParams) -> Dict[str, Any]:
|
56
54
|
params = dict(params)
|
57
55
|
|
58
56
|
if "variables" in params:
|
59
57
|
variables = params["variables"]
|
60
58
|
|
61
|
-
if isinstance(variables, list):
|
62
|
-
variables = variables[0]
|
63
|
-
|
64
59
|
if variables:
|
65
60
|
params["variables"] = self.parse_json(variables)
|
66
61
|
|
strawberry/http/types.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
from typing import Any,
|
1
|
+
from typing import Any, Mapping, Optional
|
2
2
|
from typing_extensions import Literal, TypedDict
|
3
3
|
|
4
4
|
HTTPMethod = Literal[
|
5
5
|
"GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "TRACE"
|
6
6
|
]
|
7
7
|
|
8
|
-
QueryParams = Mapping[str, Optional[
|
8
|
+
QueryParams = Mapping[str, Optional[str]]
|
9
9
|
|
10
10
|
|
11
11
|
class FormData(TypedDict):
|
strawberry/sanic/views.py
CHANGED
@@ -6,7 +6,6 @@ from typing import (
|
|
6
6
|
TYPE_CHECKING,
|
7
7
|
Any,
|
8
8
|
Dict,
|
9
|
-
List,
|
10
9
|
Mapping,
|
11
10
|
Optional,
|
12
11
|
Type,
|
@@ -43,12 +42,7 @@ class SanicHTTPRequestAdapter(AsyncHTTPRequestAdapter):
|
|
43
42
|
# the keys are the unique variable names and the values are lists
|
44
43
|
# of values for each variable name. To ensure consistency, we're
|
45
44
|
# enforcing the use of the first value in each list.
|
46
|
-
|
47
|
-
args = cast(
|
48
|
-
Dict[str, Optional[List[str]]],
|
49
|
-
self.request.get_args(keep_blank_values=True),
|
50
|
-
)
|
51
|
-
|
45
|
+
args = self.request.get_args(keep_blank_values=True)
|
52
46
|
return {k: args.get(k, None) for k in args}
|
53
47
|
|
54
48
|
@property
|
@@ -145,15 +145,15 @@ strawberry/file_uploads/__init__.py,sha256=v2-6FGBqnTnMPSUTFOiXpIutDMl-ga0PFtw5t
|
|
145
145
|
strawberry/file_uploads/scalars.py,sha256=jccJh-h7t4naRiDzrszGoYsp95zdF30c7y5Ht0Zrk_s,131
|
146
146
|
strawberry/file_uploads/utils.py,sha256=U8gk1aHjWOBa_Opyvc47h6OpYToGq1QiSnEkI2kphdo,1112
|
147
147
|
strawberry/flask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
148
|
-
strawberry/flask/views.py,sha256=
|
148
|
+
strawberry/flask/views.py,sha256=_2b92t6ZeNBct__miTHAH1t51bAKXx166JSZGeaE1cI,5568
|
149
149
|
strawberry/http/__init__.py,sha256=t-Inc7JHEr1Tr_Afu9uAb042ujpYx-jEbe_gqCfuOlc,1403
|
150
150
|
strawberry/http/async_base_view.py,sha256=4TFIUzFyxe3au5v8BpUzOdOZnQnUObrhpSBj7gd4wPU,7137
|
151
|
-
strawberry/http/base.py,sha256=
|
151
|
+
strawberry/http/base.py,sha256=4_7Y5VXQOCE7JSFKK7RJLaEQ89Pb8eU_VfJHyLqBBZU,2221
|
152
152
|
strawberry/http/exceptions.py,sha256=G1e86msTPQjl9bkLkX68SRrrdOn0VlP_ZdTetPLkX2E,163
|
153
153
|
strawberry/http/ides.py,sha256=f8sjynd4hCPJIaZaALRfJ2HM9_ghyymuCrBViAH2M34,822
|
154
154
|
strawberry/http/sync_base_view.py,sha256=1kUSlNpE32QKHwiTeZJpXkey-ztJLIhmeDUC2uZkYlo,6833
|
155
155
|
strawberry/http/temporal_response.py,sha256=6w_Nn3CNiU54jzEQP8pwzzHhGuh7eJw7S0wIneASJT8,187
|
156
|
-
strawberry/http/types.py,sha256=
|
156
|
+
strawberry/http/types.py,sha256=qnP1GaRZSF7pD29hLLw7y_eAsbsoD3tMImQ5lI4o3uI,317
|
157
157
|
strawberry/http/typevars.py,sha256=Kc2xRx3Jic7AruCtv3FOuv2hqeQQzcCLP1E53Nwmpts,207
|
158
158
|
strawberry/lazy_type.py,sha256=8ezG-Hdj3qw8O6EzY0bMNAHixveYn821EoaIAJ5gqU0,3554
|
159
159
|
strawberry/litestar/__init__.py,sha256=zsXzg-mglCGUVO9iNXLm-yadoDSCK7k-zuyRqyvAh1w,237
|
@@ -180,7 +180,7 @@ strawberry/resolvers.py,sha256=g7_g3jmXszziGydY1UG6IItf9s6B1lGLUCnwW1kb8U0,224
|
|
180
180
|
strawberry/sanic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
181
181
|
strawberry/sanic/context.py,sha256=qfoj8QMaAiWbCQFAdm2KPPJGNc7ilXeKAl5z0XJ2nzo,805
|
182
182
|
strawberry/sanic/utils.py,sha256=eDiJPJYpELj4hFsx8CCAHomqe7dDEpStDPm6OfkstJ0,998
|
183
|
-
strawberry/sanic/views.py,sha256=
|
183
|
+
strawberry/sanic/views.py,sha256=VjrBm7c-M0fdClMsCtTPsem3TWYmX7fhudPvVKXB850,5499
|
184
184
|
strawberry/scalars.py,sha256=usENRKCwl60KstV9sBGYhk2dqW5zw2wGX5eTpOWQiqg,2106
|
185
185
|
strawberry/schema/__init__.py,sha256=u1QCyDVQExUVDA20kyosKPz3TS5HMCN2NrXclhiFAL4,92
|
186
186
|
strawberry/schema/base.py,sha256=RNacxV0AdRSG2kFDitiB2G59mUjp-tFBf2mU3ZkcBbc,3607
|
@@ -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.235.
|
249
|
-
strawberry_graphql-0.235.
|
250
|
-
strawberry_graphql-0.235.
|
251
|
-
strawberry_graphql-0.235.
|
252
|
-
strawberry_graphql-0.235.
|
248
|
+
strawberry_graphql-0.235.2.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
249
|
+
strawberry_graphql-0.235.2.dist-info/METADATA,sha256=t8YEBBBt6vTpoAtdwgw7lVzWrKw8Y8aO44rPZsoTxgw,7821
|
250
|
+
strawberry_graphql-0.235.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
251
|
+
strawberry_graphql-0.235.2.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
252
|
+
strawberry_graphql-0.235.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.235.1.dist-info → strawberry_graphql-0.235.2.dist-info}/entry_points.txt
RENAMED
File without changes
|