strawberry-graphql 0.227.4__py3-none-any.whl → 0.227.6__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/extensions/tracing/datadog.py +16 -7
- strawberry/starlite/controller.py +9 -0
- {strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/METADATA +1 -1
- {strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/RECORD +7 -7
- {strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/LICENSE +0 -0
- {strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/WHEEL +0 -0
- {strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/entry_points.txt +0 -0
@@ -27,7 +27,8 @@ class DatadogTracingExtension(SchemaExtension):
|
|
27
27
|
|
28
28
|
@cached_property
|
29
29
|
def _resource_name(self) -> str:
|
30
|
-
|
30
|
+
if self.execution_context.query is None:
|
31
|
+
return "query_missing"
|
31
32
|
|
32
33
|
query_hash = self.hash_query(self.execution_context.query)
|
33
34
|
|
@@ -78,15 +79,23 @@ class DatadogTracingExtension(SchemaExtension):
|
|
78
79
|
)
|
79
80
|
self.request_span.set_tag("graphql.operation_name", self._operation_name)
|
80
81
|
|
81
|
-
|
82
|
+
query = self.execution_context.query
|
83
|
+
|
84
|
+
if query is not None:
|
85
|
+
query = query.strip()
|
86
|
+
operation_type = "query"
|
87
|
+
|
88
|
+
if query.startswith("mutation"):
|
89
|
+
operation_type = "mutation"
|
90
|
+
elif query.startswith("subscription"): # pragma: no cover
|
91
|
+
operation_type = "subscription"
|
92
|
+
else:
|
93
|
+
operation_type = "query_missing"
|
82
94
|
|
83
|
-
operation_type = "query"
|
84
|
-
if self.execution_context.query.strip().startswith("mutation"):
|
85
|
-
operation_type = "mutation"
|
86
|
-
elif self.execution_context.query.strip().startswith("subscription"):
|
87
|
-
operation_type = "subscription"
|
88
95
|
self.request_span.set_tag("graphql.operation_type", operation_type)
|
96
|
+
|
89
97
|
yield
|
98
|
+
|
90
99
|
self.request_span.finish()
|
91
100
|
|
92
101
|
def on_validate(self) -> Generator[None, None, None]:
|
@@ -6,6 +6,7 @@ import warnings
|
|
6
6
|
from dataclasses import dataclass
|
7
7
|
from datetime import timedelta
|
8
8
|
from typing import TYPE_CHECKING, Any, Dict, Mapping, Optional, Tuple, Union, cast
|
9
|
+
from typing_extensions import deprecated
|
9
10
|
|
10
11
|
from starlite import (
|
11
12
|
BackgroundTasks,
|
@@ -118,6 +119,10 @@ class GraphQLTransportWSHandler(BaseGraphQLTransportWSHandler):
|
|
118
119
|
return await self._get_root_value()
|
119
120
|
|
120
121
|
|
122
|
+
@deprecated(
|
123
|
+
"The `starlite` integration is deprecated in favor of `litestar` integration",
|
124
|
+
stacklevel=2,
|
125
|
+
)
|
121
126
|
class StarliteRequestAdapter(AsyncHTTPRequestAdapter):
|
122
127
|
def __init__(self, request: Request[Any, Any]) -> None:
|
123
128
|
self.request = request
|
@@ -153,6 +158,10 @@ class BaseContext:
|
|
153
158
|
self.response: Optional[Response] = None
|
154
159
|
|
155
160
|
|
161
|
+
@deprecated(
|
162
|
+
"The `starlite` integration is deprecated in favor of `litestar` integration",
|
163
|
+
stacklevel=2,
|
164
|
+
)
|
156
165
|
def make_graphql_controller(
|
157
166
|
schema: BaseSchema,
|
158
167
|
path: str = "",
|
@@ -113,7 +113,7 @@ strawberry/extensions/query_depth_limiter.py,sha256=lm9KTQOCTTGzXvMWyafROhQ3MhZX
|
|
113
113
|
strawberry/extensions/runner.py,sha256=HNi0haRUbd_eGlDG-zByR5KmOylDQPCqMUsLZnzLzWo,2696
|
114
114
|
strawberry/extensions/tracing/__init__.py,sha256=wx8_EAroGhNrP4HiGYMgKo8jnCsfde5ib6lO4OvcLV0,1400
|
115
115
|
strawberry/extensions/tracing/apollo.py,sha256=ZdxxFEQi1lCpCWfCETOfcK_-Ivw-jUSg-rIKOYlm_i4,5811
|
116
|
-
strawberry/extensions/tracing/datadog.py,sha256=
|
116
|
+
strawberry/extensions/tracing/datadog.py,sha256=gFXSzavF8ahUpnLj4t2ulJDy4I_Y-1FMhCaX5P6ZL7I,5448
|
117
117
|
strawberry/extensions/tracing/opentelemetry.py,sha256=vuC8IKevMP_Vt0Q-tcHM3UkWasU4S0NhgsAHCNr3j3s,7212
|
118
118
|
strawberry/extensions/tracing/sentry.py,sha256=XxXtJ6sPVbc2ucZo_p1HroTOn2N9Dl_uUfZNAWut_XM,4954
|
119
119
|
strawberry/extensions/tracing/utils.py,sha256=O3-XJ25TqJJ9X1wHi0-0iX4U_3uv2YiB6TJfxGqtnek,618
|
@@ -197,7 +197,7 @@ strawberry/schema/types/scalar.py,sha256=SVJ8HiKncCvOw2xwABI5xYaHcC7KkGHG-tx2WDt
|
|
197
197
|
strawberry/schema_codegen/__init__.py,sha256=PcCVXjS0Y5Buxadm07YAZOVunkQ_DmmwsBrgsH1T4ds,24375
|
198
198
|
strawberry/schema_directive.py,sha256=XGKwcsxRpHXJQ_qXXMi1gEXlZOG22SbDf4Phxf4tbQ0,1967
|
199
199
|
strawberry/starlite/__init__.py,sha256=v209swT8H9MljVL-npvANhEO1zz3__PSfxb_Ix-NoeE,134
|
200
|
-
strawberry/starlite/controller.py,sha256=
|
200
|
+
strawberry/starlite/controller.py,sha256=moo2HlaJT6w9AijwjHvXi4UibUydaZfA75JMFZVMJPw,12191
|
201
201
|
strawberry/starlite/handlers/graphql_transport_ws_handler.py,sha256=WhfFVWdjRSk4A48MaBLGWqZdi2OnHajxdQlA_Gc4XBE,1981
|
202
202
|
strawberry/starlite/handlers/graphql_ws_handler.py,sha256=v1RxhvahVazKUg-KXosAcZfv5ap1rEp1A3726d5LkiU,2223
|
203
203
|
strawberry/static/apollo-sandbox.html,sha256=2XzkbE0dqsFHqehE-jul9_J9TFOpwA6Ylrlo0Kdx_9w,973
|
@@ -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=SQVOw1nuFZk2Pe3iz0o8ebzpoyvBVoGSQZVZj6-8k7I,13483
|
244
|
-
strawberry_graphql-0.227.
|
245
|
-
strawberry_graphql-0.227.
|
246
|
-
strawberry_graphql-0.227.
|
247
|
-
strawberry_graphql-0.227.
|
248
|
-
strawberry_graphql-0.227.
|
244
|
+
strawberry_graphql-0.227.6.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
|
245
|
+
strawberry_graphql-0.227.6.dist-info/METADATA,sha256=YsRi6058_GNaC1KQg_-QkUehJy7yy_kkrhY56AuU_Mo,7821
|
246
|
+
strawberry_graphql-0.227.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
247
|
+
strawberry_graphql-0.227.6.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
|
248
|
+
strawberry_graphql-0.227.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|
{strawberry_graphql-0.227.4.dist-info → strawberry_graphql-0.227.6.dist-info}/entry_points.txt
RENAMED
File without changes
|