strawberry-graphql 0.246.1__py3-none-any.whl → 0.246.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.
- strawberry/flask/views.py +2 -1
- strawberry/permission.py +12 -4
- {strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/METADATA +2 -1
- {strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/RECORD +7 -7
- {strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/WHEEL +1 -1
- {strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/entry_points.txt +0 -0
strawberry/flask/views.py
CHANGED
@@ -187,7 +187,8 @@ class AsyncGraphQLView(
|
|
187
187
|
)
|
188
188
|
|
189
189
|
async def render_graphql_ide(self, request: Request) -> Response:
|
190
|
-
|
190
|
+
content = render_template_string(self.graphql_ide_html)
|
191
|
+
return Response(content, status=200, content_type="text/html")
|
191
192
|
|
192
193
|
def is_websocket_request(self, request: Request) -> TypeGuard[Request]:
|
193
194
|
return False
|
strawberry/permission.py
CHANGED
@@ -156,11 +156,19 @@ class PermissionExtension(FieldExtension):
|
|
156
156
|
self.use_directives = use_directives
|
157
157
|
|
158
158
|
def apply(self, field: StrawberryField) -> None:
|
159
|
-
"""Applies all of the permission directives to the schema and sets up silent permissions."""
|
159
|
+
"""Applies all of the permission directives (deduped) to the schema and sets up silent permissions."""
|
160
160
|
if self.use_directives:
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
permission_directives = [
|
162
|
+
perm.schema_directive
|
163
|
+
for perm in self.permissions
|
164
|
+
if perm.schema_directive
|
165
|
+
]
|
166
|
+
# Iteration, because we want to keep order
|
167
|
+
for perm_directive in permission_directives:
|
168
|
+
# Dedupe multiple directives
|
169
|
+
if perm_directive in field.directives:
|
170
|
+
continue
|
171
|
+
field.directives.append(perm_directive)
|
164
172
|
# We can only fail silently if the field is optional or a list
|
165
173
|
if self.fail_silently:
|
166
174
|
if isinstance(field.type, StrawberryOptional):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: strawberry-graphql
|
3
|
-
Version: 0.246.
|
3
|
+
Version: 0.246.3
|
4
4
|
Summary: A library for creating GraphQL APIs
|
5
5
|
Home-page: https://strawberry.rocks/
|
6
6
|
License: MIT
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.10
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
20
21
|
Classifier: Topic :: Software Development :: Libraries
|
21
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
22
23
|
Provides-Extra: aiohttp
|
@@ -130,7 +130,7 @@ strawberry/file_uploads/__init__.py,sha256=v2-6FGBqnTnMPSUTFOiXpIutDMl-ga0PFtw5t
|
|
130
130
|
strawberry/file_uploads/scalars.py,sha256=NRDeB7j8aotqIkz9r62ISTf4DrxQxEZYUuHsX5K16aU,161
|
131
131
|
strawberry/file_uploads/utils.py,sha256=2zsXg3QsKgGLD7of2dW-vgQn_Naf7I3Men9PhEAFYwM,1160
|
132
132
|
strawberry/flask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
|
-
strawberry/flask/views.py,sha256=
|
133
|
+
strawberry/flask/views.py,sha256=3gd1Xgxg3IT72dz2nrMBK094dMNxTUHciu3oofGOAG4,6235
|
134
134
|
strawberry/http/__init__.py,sha256=GSvHUDXl1cHfLnb37PXOAnxfoXhvz0f467P1O8uDatM,1620
|
135
135
|
strawberry/http/async_base_view.py,sha256=ZWxxLNCISinp9nc7878_0FjRt8y-giQbtJgSF-Q4ZF0,15688
|
136
136
|
strawberry/http/base.py,sha256=DFGBb6UhHR1EOmZkLn5V-2IKXzjYasg6yv06PQnm9Ds,2336
|
@@ -144,7 +144,7 @@ strawberry/http/typevars.py,sha256=8hK5PfNPZXb2EhZmqlobYyfwJJcO2Wb96T91MlLEVJs,4
|
|
144
144
|
strawberry/litestar/__init__.py,sha256=zsXzg-mglCGUVO9iNXLm-yadoDSCK7k-zuyRqyvAh1w,237
|
145
145
|
strawberry/litestar/controller.py,sha256=oKjio86UsFjvdwxx80YqX_-WWnw51Sd7saMulQ0ihIQ,13519
|
146
146
|
strawberry/parent.py,sha256=sXURm0lauSpjUADsmfNGY-Zl7kHs0A67BFcWuWKzRxw,771
|
147
|
-
strawberry/permission.py,sha256=
|
147
|
+
strawberry/permission.py,sha256=HusiB46yZANdpZM3AdzFVZB6JkCu7dcvoZ3QP2E01jM,7575
|
148
148
|
strawberry/printer/__init__.py,sha256=DmepjmgtkdF5RxK_7yC6qUyRWn56U-9qeZMbkztYB9w,62
|
149
149
|
strawberry/printer/ast_from_value.py,sha256=LgM5g2qvBOnAIf9znbiMEcRX0PGSQohR3Vr3QYfU604,4983
|
150
150
|
strawberry/printer/printer.py,sha256=GntTBivg3fb_zPM41Q8DtWMiRmkmM9xwTF-aFWvnqTg,17524
|
@@ -230,8 +230,8 @@ strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,7
|
|
230
230
|
strawberry/utils/operation.py,sha256=SSXxN-vMqdHO6W2OZtip-1z7y4_A-eTVFdhDvhKeLCk,1193
|
231
231
|
strawberry/utils/str_converters.py,sha256=KGd7QH90RevaJjH6SQEkiVVsb8KuhJr_wv5AsI7UzQk,897
|
232
232
|
strawberry/utils/typing.py,sha256=3xws5kxSQGsp8BnYyUwClvxXNzZakMAuOPoq1rjHRuk,14252
|
233
|
-
strawberry_graphql-0.246.
|
234
|
-
strawberry_graphql-0.246.
|
235
|
-
strawberry_graphql-0.246.
|
236
|
-
strawberry_graphql-0.246.
|
237
|
-
strawberry_graphql-0.246.
|
233
|
+
strawberry_graphql-0.246.3.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
234
|
+
strawberry_graphql-0.246.3.dist-info/METADATA,sha256=Q7vLEXz9pa7Nxmw2LwvWhS6Zw6K6BGlkOtyj979K154,7758
|
235
|
+
strawberry_graphql-0.246.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
236
|
+
strawberry_graphql-0.246.3.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
237
|
+
strawberry_graphql-0.246.3.dist-info/RECORD,,
|
File without changes
|
{strawberry_graphql-0.246.1.dist-info → strawberry_graphql-0.246.3.dist-info}/entry_points.txt
RENAMED
File without changes
|