strawberry-graphql 0.282.0__py3-none-any.whl → 0.283.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.
@@ -87,7 +87,7 @@ class GraphQLView(
87
87
 
88
88
  allow_queries_via_get = True
89
89
  request_adapter_class = AiohttpHTTPRequestAdapter
90
- websocket_adapter_class = AiohttpWebSocketAdapter
90
+ websocket_adapter_class = AiohttpWebSocketAdapter # type: ignore
91
91
 
92
92
  def __init__(
93
93
  self,
@@ -93,7 +93,7 @@ class GraphQL(
93
93
  ):
94
94
  allow_queries_via_get = True
95
95
  request_adapter_class = StarletteRequestAdapter
96
- websocket_adapter_class = ASGIWebSocketAdapter
96
+ websocket_adapter_class = ASGIWebSocketAdapter # type: ignore
97
97
 
98
98
  def __init__(
99
99
  self,
@@ -102,7 +102,7 @@ class GraphQLWSConsumer(
102
102
  ```
103
103
  """
104
104
 
105
- websocket_adapter_class = ChannelsWebSocketAdapter
105
+ websocket_adapter_class = ChannelsWebSocketAdapter # type: ignore
106
106
 
107
107
  def __init__(
108
108
  self,
@@ -1,6 +1,7 @@
1
1
  try:
2
2
  from .app import app
3
3
  from .commands.codegen import codegen as codegen
4
+ from .commands.dev import dev as dev
4
5
  from .commands.export_schema import export_schema as export_schema
5
6
  from .commands.locate_definition import (
6
7
  locate_definition as locate_definition,
@@ -0,0 +1,72 @@
1
+ import os
2
+ import sys
3
+ from enum import Enum
4
+ from typing import Annotated
5
+
6
+ import rich
7
+ import typer
8
+
9
+ from strawberry.cli.app import app
10
+ from strawberry.cli.constants import DEV_SERVER_SCHEMA_ENV_VAR_KEY
11
+ from strawberry.cli.utils import load_schema
12
+
13
+
14
+ class LogLevel(str, Enum):
15
+ critical = "critical"
16
+ error = "error"
17
+ warning = "warning"
18
+ info = "info"
19
+ debug = "debug"
20
+ trace = "trace"
21
+
22
+
23
+ @app.command(help="Starts the dev server")
24
+ def dev(
25
+ schema: str,
26
+ host: Annotated[
27
+ str, typer.Option("-h", "--host", help="Host to bind the server to.")
28
+ ] = "0.0.0.0", # noqa: S104
29
+ port: Annotated[
30
+ int, typer.Option("-p", "--port", help="Port to bind the server to.")
31
+ ] = 8000,
32
+ log_level: Annotated[
33
+ LogLevel,
34
+ typer.Option(
35
+ "--log-level", help="Passed to uvicorn to determine the server log level."
36
+ ),
37
+ ] = LogLevel.error,
38
+ app_dir: Annotated[
39
+ str,
40
+ typer.Option(
41
+ "--app-dir",
42
+ help="Look for the schema module in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.",
43
+ ),
44
+ ] = ".",
45
+ ) -> None:
46
+ try:
47
+ import starlette # noqa: F401
48
+ import uvicorn
49
+ except ImportError:
50
+ rich.print(
51
+ "[red]Error: The dev server requires additional packages, install them by running:\n"
52
+ r"pip install 'strawberry-graphql\[cli]'"
53
+ )
54
+ raise typer.Exit(1) from None
55
+
56
+ sys.path.insert(0, app_dir)
57
+ load_schema(schema, app_dir=app_dir)
58
+
59
+ os.environ[DEV_SERVER_SCHEMA_ENV_VAR_KEY] = schema
60
+ asgi_app = "strawberry.cli.dev_server:app"
61
+
62
+ end = " 🍓\n" if sys.platform != "win32" else "\n"
63
+ rich.print(f"Running strawberry on http://{host}:{port}/graphql", end=end)
64
+
65
+ uvicorn.run(
66
+ asgi_app,
67
+ host=host,
68
+ port=port,
69
+ log_level=log_level,
70
+ reload=True,
71
+ reload_dirs=[app_dir],
72
+ )
@@ -1,13 +1,8 @@
1
- import os
2
- import sys
3
1
  from enum import Enum
4
2
 
5
- import rich
6
3
  import typer
7
4
 
8
5
  from strawberry.cli.app import app
9
- from strawberry.cli.constants import DEBUG_SERVER_SCHEMA_ENV_VAR_KEY
10
- from strawberry.cli.utils import load_schema
11
6
 
12
7
 
13
8
  class LogLevel(str, Enum):
@@ -40,33 +35,7 @@ def server(
40
35
  ),
41
36
  ),
42
37
  ) -> None:
43
- sys.path.insert(0, app_dir)
44
-
45
- try:
46
- import starlette # noqa: F401
47
- import uvicorn
48
- except ImportError:
49
- rich.print(
50
- "[red]Error: The debug server requires additional packages, "
51
- "install them by running:\n"
52
- r"pip install 'strawberry-graphql\[debug-server]'"
53
- )
54
- raise typer.Exit(1) # noqa: B904
55
-
56
- load_schema(schema, app_dir=app_dir)
57
-
58
- os.environ[DEBUG_SERVER_SCHEMA_ENV_VAR_KEY] = schema
59
- app = "strawberry.cli.debug_server:app"
60
-
61
- # Windows doesn't support UTF-8 by default
62
- endl = " 🍓\n" if sys.platform != "win32" else "\n"
63
- print(f"Running strawberry on http://{host}:{port}/graphql", end=endl) # noqa: T201
64
-
65
- uvicorn.run(
66
- app,
67
- host=host,
68
- port=port,
69
- log_level=log_level,
70
- reload=True,
71
- reload_dirs=[app_dir],
38
+ typer.echo(
39
+ "The `strawberry server` command is deprecated, use `strawberry dev` instead."
72
40
  )
41
+ raise typer.Exit(1)
@@ -1 +1 @@
1
- DEBUG_SERVER_SCHEMA_ENV_VAR_KEY = "STRAWBERRY_DEBUG_SERVER_SCHEMA"
1
+ DEV_SERVER_SCHEMA_ENV_VAR_KEY = "STRAWBERRY_DEV_SERVER_SCHEMA"
@@ -6,7 +6,7 @@ from starlette.middleware.cors import CORSMiddleware
6
6
 
7
7
  from strawberry import Schema
8
8
  from strawberry.asgi import GraphQL
9
- from strawberry.cli.constants import DEBUG_SERVER_SCHEMA_ENV_VAR_KEY
9
+ from strawberry.cli.constants import DEV_SERVER_SCHEMA_ENV_VAR_KEY
10
10
  from strawberry.utils.importer import import_module_symbol
11
11
 
12
12
  app = Starlette(debug=True)
@@ -14,7 +14,7 @@ app.add_middleware(
14
14
  CORSMiddleware, allow_headers=["*"], allow_origins=["*"], allow_methods=["*"]
15
15
  )
16
16
 
17
- schema_import_string = os.environ[DEBUG_SERVER_SCHEMA_ENV_VAR_KEY]
17
+ schema_import_string = os.environ[DEV_SERVER_SCHEMA_ENV_VAR_KEY]
18
18
  schema_symbol = import_module_symbol(schema_import_string, default_symbol_name="schema")
19
19
 
20
20
  assert isinstance(schema_symbol, Schema)
@@ -13,7 +13,7 @@ from typing import (
13
13
  Union,
14
14
  cast,
15
15
  )
16
- from typing_extensions import Literal, Protocol
16
+ from typing_extensions import Protocol
17
17
 
18
18
  import rich
19
19
  from graphql import (
@@ -473,18 +473,13 @@ class QueryCodegen:
473
473
  class_name=result_class_name,
474
474
  )
475
475
 
476
- operation_kind = cast(
477
- "Literal['query', 'mutation', 'subscription']",
478
- operation_definition.operation.value,
479
- )
480
-
481
476
  variables, variables_type = self._convert_variable_definitions(
482
477
  operation_definition.variable_definitions, operation_name=operation_name
483
478
  )
484
479
 
485
480
  return GraphQLOperation(
486
481
  operation_definition.name.value,
487
- kind=operation_kind,
482
+ kind=operation_definition.operation.value,
488
483
  selections=self._convert_selection_set(operation_definition.selection_set),
489
484
  directives=self._convert_directives(operation_definition.directives),
490
485
  variables=variables,
@@ -355,7 +355,7 @@ def add_static_method_to_class(
355
355
  arg_types, arg_kinds, arg_names, return_type, function_type
356
356
  )
357
357
  if tvar_def:
358
- signature.variables = [tvar_def]
358
+ signature.variables = [tvar_def] # type: ignore[assignment]
359
359
 
360
360
  func = FuncDef(name, args, Block([PassStmt()]))
361
361
 
@@ -62,7 +62,7 @@ class GraphQLRouter(
62
62
  ):
63
63
  allow_queries_via_get = True
64
64
  request_adapter_class = StarletteRequestAdapter
65
- websocket_adapter_class = ASGIWebSocketAdapter
65
+ websocket_adapter_class = ASGIWebSocketAdapter # type: ignore
66
66
 
67
67
  @staticmethod
68
68
  async def __get_root_value() -> None:
strawberry/http/base.py CHANGED
@@ -78,13 +78,12 @@ class BaseView(Generic[Request]):
78
78
  def _is_multipart_subscriptions(
79
79
  self, content_type: str, params: dict[str, str]
80
80
  ) -> bool:
81
- if content_type != "multipart/mixed":
82
- return False
83
-
84
- if params.get("boundary") != "graphql":
85
- return False
86
-
87
- return params.get("subscriptionspec", "").startswith("1.0")
81
+ subscription_spec = params.get("subscriptionspec", "").strip("'\"")
82
+ return (
83
+ content_type == "multipart/mixed"
84
+ and ("boundary" not in params or params["boundary"] == "graphql")
85
+ and subscription_spec.startswith("1.0")
86
+ )
88
87
 
89
88
  def _validate_batch_request(
90
89
  self, request_data: list[GraphQLRequestData], protocol: str
@@ -208,7 +208,7 @@ class GraphQLController(
208
208
  }
209
209
 
210
210
  request_adapter_class = LitestarRequestAdapter
211
- websocket_adapter_class = LitestarWebSocketAdapter
211
+ websocket_adapter_class = LitestarWebSocketAdapter # type: ignore
212
212
 
213
213
  allow_queries_via_get: bool = True
214
214
  graphiql_allowed_accept: frozenset[str] = frozenset({"text/html", "*/*"})
strawberry/quart/views.py CHANGED
@@ -78,7 +78,7 @@ class GraphQLView(
78
78
  methods: ClassVar[list[str]] = ["GET", "POST"]
79
79
  allow_queries_via_get: bool = True
80
80
  request_adapter_class = QuartHTTPRequestAdapter
81
- websocket_adapter_class = QuartWebSocketAdapter
81
+ websocket_adapter_class = QuartWebSocketAdapter # type: ignore
82
82
 
83
83
  def __init__(
84
84
  self,
@@ -7,16 +7,16 @@ from graphql.execution import execute, subscribe
7
7
  from strawberry.types import ExecutionResult
8
8
 
9
9
  try:
10
- from graphql import ( # type: ignore[attr-defined]
11
- ExperimentalIncrementalExecutionResults as GraphQLIncrementalExecutionResults,
10
+ from graphql import (
11
+ ExperimentalIncrementalExecutionResults as GraphQLIncrementalExecutionResults, # type: ignore[attr-defined]
12
12
  )
13
- from graphql.execution import ( # type: ignore[attr-defined]
14
- InitialIncrementalExecutionResult,
15
- experimental_execute_incrementally,
13
+ from graphql.execution import (
14
+ InitialIncrementalExecutionResult, # type: ignore[attr-defined]
15
+ experimental_execute_incrementally, # type: ignore[attr-defined]
16
16
  )
17
- from graphql.type.directives import ( # type: ignore[attr-defined]
18
- GraphQLDeferDirective,
19
- GraphQLStreamDirective,
17
+ from graphql.type.directives import (
18
+ GraphQLDeferDirective, # type: ignore[attr-defined]
19
+ GraphQLStreamDirective, # type: ignore[attr-defined]
20
20
  )
21
21
 
22
22
  incremental_execution_directives = (
strawberry/types/field.py CHANGED
@@ -292,7 +292,7 @@ class StrawberryField(dataclasses.Field):
292
292
  # removed.
293
293
  _ = resolver.arguments
294
294
 
295
- @property # type: ignore
295
+ @property
296
296
  def type(
297
297
  self,
298
298
  ) -> Union[ # type: ignore [valid-type]
strawberry/types/info.py CHANGED
@@ -78,7 +78,7 @@ class Info(Generic[ContextType, RootValueType]):
78
78
  https://discuss.python.org/t/passing-only-one-typevar-of-two-when-using-defaults/49134
79
79
  """
80
80
  if not isinstance(types, tuple):
81
- types = (types, Any) # type: ignore
81
+ types = (types, Any)
82
82
 
83
83
  return super().__class_getitem__(types) # type: ignore
84
84
 
@@ -130,10 +130,7 @@ def is_concrete_generic(annotation: type) -> bool:
130
130
 
131
131
 
132
132
  def is_generic_subclass(annotation: type) -> bool:
133
- return isinstance(annotation, type) and issubclass(
134
- annotation,
135
- Generic, # type:ignore
136
- )
133
+ return isinstance(annotation, type) and issubclass(annotation, Generic)
137
134
 
138
135
 
139
136
  def is_generic(annotation: type) -> bool:
@@ -182,7 +179,7 @@ def type_has_annotation(type_: object, annotation: type) -> bool:
182
179
  def get_parameters(annotation: type) -> Union[tuple[object], tuple[()]]:
183
180
  if isinstance(annotation, _GenericAlias) or (
184
181
  isinstance(annotation, type)
185
- and issubclass(annotation, Generic) # type:ignore
182
+ and issubclass(annotation, Generic)
186
183
  and annotation is not Generic
187
184
  ):
188
185
  return annotation.__parameters__ # type: ignore[union-attr]
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: strawberry-graphql
3
- Version: 0.282.0
3
+ Version: 0.283.1
4
4
  Summary: A library for creating GraphQL APIs
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Keywords: graphql,api,rest,starlette,async
7
8
  Author: Patrick Arminio
8
9
  Author-email: patrick.arminio@gmail.com
@@ -51,6 +52,7 @@ Requires-Dist: pygments (>=2.3,<3.0) ; extra == "debug-server"
51
52
  Requires-Dist: pyinstrument (>=4.0.0) ; extra == "pyinstrument"
52
53
  Requires-Dist: python-dateutil (>=2.7,<3.0)
53
54
  Requires-Dist: python-multipart (>=0.0.7) ; extra == "asgi"
55
+ Requires-Dist: python-multipart (>=0.0.7) ; extra == "cli"
54
56
  Requires-Dist: python-multipart (>=0.0.7) ; extra == "debug-server"
55
57
  Requires-Dist: python-multipart (>=0.0.7) ; extra == "fastapi"
56
58
  Requires-Dist: quart (>=0.19.3) ; extra == "quart"
@@ -59,11 +61,14 @@ Requires-Dist: rich (>=12.0.0) ; extra == "debug"
59
61
  Requires-Dist: rich (>=12.0.0) ; extra == "debug-server"
60
62
  Requires-Dist: sanic (>=20.12.2) ; extra == "sanic"
61
63
  Requires-Dist: starlette (>=0.18.0) ; extra == "asgi"
64
+ Requires-Dist: starlette (>=0.18.0) ; extra == "cli"
62
65
  Requires-Dist: starlette (>=0.18.0) ; extra == "debug-server"
63
66
  Requires-Dist: typer (>=0.7.0) ; extra == "cli"
64
67
  Requires-Dist: typer (>=0.7.0) ; extra == "debug-server"
65
68
  Requires-Dist: typing-extensions (>=4.5.0)
69
+ Requires-Dist: uvicorn (>=0.11.6) ; extra == "cli"
66
70
  Requires-Dist: uvicorn (>=0.11.6) ; extra == "debug-server"
71
+ Requires-Dist: websockets (>=15.0.1,<16) ; extra == "cli"
67
72
  Requires-Dist: websockets (>=15.0.1,<16) ; extra == "debug-server"
68
73
  Project-URL: Changelog, https://strawberry.rocks/changelog
69
74
  Project-URL: Documentation, https://strawberry.rocks/
@@ -92,7 +97,7 @@ The quick start method provides a server and CLI to get going quickly. Install
92
97
  with:
93
98
 
94
99
  ```shell
95
- pip install "strawberry-graphql[debug-server]"
100
+ pip install "strawberry-graphql[cli]"
96
101
  ```
97
102
 
98
103
  ## Getting Started
@@ -122,13 +127,13 @@ schema = strawberry.Schema(query=Query)
122
127
  This will create a GraphQL schema defining a `User` type and a single query
123
128
  field `user` that will return a hardcoded user.
124
129
 
125
- To run the debug server run the following command:
130
+ To serve the schema using the dev server run the following command:
126
131
 
127
132
  ```shell
128
- strawberry server app
133
+ strawberry dev app
129
134
  ```
130
135
 
131
- Open the debug server by clicking on the following link:
136
+ Open the dev server by clicking on the following link:
132
137
  [http://0.0.0.0:8000/graphql](http://0.0.0.0:8000/graphql)
133
138
 
134
139
  This will open GraphiQL where you can test the API.
@@ -185,7 +190,7 @@ get started follow these steps:
185
190
  ```shell
186
191
  git clone https://github.com/strawberry-graphql/strawberry
187
192
  cd strawberry
188
- poetry install --with integrations
193
+ poetry install
189
194
  poetry run pytest
190
195
  ```
191
196
 
@@ -3,9 +3,9 @@ strawberry/__main__.py,sha256=3U77Eu21mJ-LY27RG-JEnpbh6Z63wGOom4i-EoLtUcY,59
3
3
  strawberry/aiohttp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  strawberry/aiohttp/test/__init__.py,sha256=4xxdUZtIISSOwjrcnmox7AvT4WWjowCm5bUuPdQneMg,71
5
5
  strawberry/aiohttp/test/client.py,sha256=8FKZTnvawxYpgEICOri-34O3wHRHLhRpjH_Ktp2EupQ,1801
6
- strawberry/aiohttp/views.py,sha256=U6fdzvVmFv2wnnsrsgo6XfUTzG-uyYn0zDKJQvA4HF8,6600
6
+ strawberry/aiohttp/views.py,sha256=7kOLRD__NeF8qFjfnM5Gkii5_VADvuJTyVqRHxFxY9o,6616
7
7
  strawberry/annotation.py,sha256=68j7Sku1JT7pUTsUMxekWmQMyFdlV1D0jLFjukmmGpQ,15907
8
- strawberry/asgi/__init__.py,sha256=hx1Qh13ER6k_PoS3VPStvPPcGUitMrB6MUXKN1Qhzgo,7257
8
+ strawberry/asgi/__init__.py,sha256=1fRF05oYcYNQZ6lvweRrNABdpEDxOn81rp56v1F8QOw,7273
9
9
  strawberry/asgi/test/__init__.py,sha256=4xxdUZtIISSOwjrcnmox7AvT4WWjowCm5bUuPdQneMg,71
10
10
  strawberry/asgi/test/client.py,sha256=kp2O5znHWuAB5VVYO8p4XPSTEDDXBSjNz5WHqW0r6GM,1473
11
11
  strawberry/chalice/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -14,22 +14,23 @@ strawberry/channels/__init__.py,sha256=AVmEwhzGHcTycMCnZYcZFFqZV8tKw9FJN4YXws-vW
14
14
  strawberry/channels/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  strawberry/channels/handlers/base.py,sha256=3mSvT2HMlOoWr0Y_8y1wwSmvCmB8osy2pEK1Kc5zJ5M,7841
16
16
  strawberry/channels/handlers/http_handler.py,sha256=EmRVgn0AHG9-dNUOU_rgKf0Ppsh8aiVYpXsVWMJKbNE,12461
17
- strawberry/channels/handlers/ws_handler.py,sha256=846Nj9bdcRJ1jezIa-Dmn3S_cgi8W-JTLt6mITG8ff4,6172
17
+ strawberry/channels/handlers/ws_handler.py,sha256=YOAoyidWRA3VHsyYcyv1uPFechRs-wfigZPze8VA9bc,6188
18
18
  strawberry/channels/router.py,sha256=DKIbl4zuRBhfvViUVpyu0Rf_WRT41E6uZC-Yic9Ltvo,2024
19
19
  strawberry/channels/testing.py,sha256=dc9mvSm9YdNOUgQk5ou5K4iE2h6TP5quKnk4Xdtn-IY,6558
20
- strawberry/cli/__init__.py,sha256=9rqBIeRSi0P0JljMWO43KC3inm4BBf0CX5pEWQWnTos,662
20
+ strawberry/cli/__init__.py,sha256=szPgUPbmZKgoYVY1EsqnUFWi8onJVje3EUx3ACbnfA4,703
21
21
  strawberry/cli/app.py,sha256=tTMBV1pdWqMcwjWO2yn-8oLDhMhfJvUzyQtWs75LWJ0,54
22
22
  strawberry/cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  strawberry/cli/commands/codegen.py,sha256=WbX8uqF-dpQk1QjQm3H4AvNSZ4lIUOTSPghii3attj8,3812
24
+ strawberry/cli/commands/dev.py,sha256=WSyOtaApia746B-X3AyiaPQd4jQ506mNrTGUN0Iq7RI,1968
24
25
  strawberry/cli/commands/export_schema.py,sha256=pyp_Q3BiO7lFH0L3mNPvr7UF8hlhcoUPqqBP4JPWUu0,1049
25
26
  strawberry/cli/commands/locate_definition.py,sha256=aJJ_KeAnV-c8zTdWIhzcHUilUmCpqsmrVy24qHbyWKk,1001
26
27
  strawberry/cli/commands/schema_codegen.py,sha256=G6eV08a51sjVxCm3jn75oPn9hC8YarKiAKOY5bpTuKU,749
27
- strawberry/cli/commands/server.py,sha256=Q55Eog7oseB127Qvy81MJPQb2DcVkACFg4NGJq2Hl24,1953
28
+ strawberry/cli/commands/server.py,sha256=nbIz-0l_EqQkvpSlg5h9eGFtfW3eSjxUt9bLgRelylo,1066
28
29
  strawberry/cli/commands/upgrade/__init__.py,sha256=yj7OxtXhvYdV-P072VFrLnbQmtREnYMLn7iku8gap6k,2596
29
30
  strawberry/cli/commands/upgrade/_fake_progress.py,sha256=fefLgJwTXe4kG9RntdEJdzkPPRBK_pZqnmMH-pxD85Y,484
30
31
  strawberry/cli/commands/upgrade/_run_codemod.py,sha256=LZd5D1PP65bwVZjBvPPVrZ9t-bfvrafZ__HPBrW2WYA,2168
31
- strawberry/cli/constants.py,sha256=oELrG15571w3fG66EGBwtMHmMFbknJigkL385yzQnyI,67
32
- strawberry/cli/debug_server.py,sha256=KANdDHyOybr2SZMs2OAuOf4Haz_SNSHKiiBeemx8fGc,868
32
+ strawberry/cli/constants.py,sha256=MZ8JTo6YyS8t_mRtJJuNCQPiaKzyqjDbncizDb2pG-c,63
33
+ strawberry/cli/dev_server.py,sha256=u6PAAl6Un0SHdsHDWDnQ85VPCY9g5HTNi2VKOFgJl_A,864
33
34
  strawberry/cli/utils/__init__.py,sha256=5h6QMXbY4zbWVGg8xpsKlgWSEsNgn1fcjbRrJjgzdEc,987
34
35
  strawberry/cli/utils/load_schema.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
36
  strawberry/codegen/__init__.py,sha256=qVfUJXv_2HqZTzi02An2V9auAseT9efi1f5APDG5DjA,250
@@ -38,7 +39,7 @@ strawberry/codegen/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
38
39
  strawberry/codegen/plugins/print_operation.py,sha256=PxNPw9gXtqC_upIhgM9I6pmb66g523VMcIaKgLDMuOc,6799
39
40
  strawberry/codegen/plugins/python.py,sha256=GgwxTGd16LPKxGuZBohJYWsarKjWfZY1-aGIA71m9MU,6903
40
41
  strawberry/codegen/plugins/typescript.py,sha256=LFEK2ZLz4tUukkwZvUTXhsi_cVca3ybsLaatsW5JA5g,3865
41
- strawberry/codegen/query_codegen.py,sha256=F5z-6qK5KcagagBcZvnjx6iIvdJol17DsBQt7TqhCH4,30539
42
+ strawberry/codegen/query_codegen.py,sha256=eQq7NDz_2dYQ3U5by5lxn73Jm-5pVsJTRcOnFtDRknY,30400
42
43
  strawberry/codegen/types.py,sha256=K5sjzNWDefOzdGtPumXyLuhnlEtd0zZXdPkF15lejk0,4181
43
44
  strawberry/codemods/__init__.py,sha256=iXL0fq_VMhmSN3NFkQC4IwQn3pscfES61icODcJAjeo,268
44
45
  strawberry/codemods/annotated_unions.py,sha256=T0KqJEmoOdOXVCOHI1G6ECvEVL2tzIRBenysrz3EhPQ,5988
@@ -90,7 +91,7 @@ strawberry/ext/dataclasses/LICENSE,sha256=WZgm35K_3NJwLqxpEHJJi7CWxVrwTumEz5D3Dt
90
91
  strawberry/ext/dataclasses/README.md,sha256=WE3523o9gBGpa18ikiQhgEUNuuBJWR5tMKmjicrLOHU,1389
91
92
  strawberry/ext/dataclasses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
93
  strawberry/ext/dataclasses/dataclasses.py,sha256=bTW8nRwflW7_JtGhzXiKhe9Kajha_fgCfR0jVKrCzBw,2287
93
- strawberry/ext/mypy_plugin.py,sha256=KqpEWUnQftmmlC0CtK33H1FMR7P-WdI-F9Evnc60Mm0,20458
94
+ strawberry/ext/mypy_plugin.py,sha256=RmrzaQQ2SuyCIFnW4Ks7mfzd6A_UvYFJadJORqdrsXQ,20486
94
95
  strawberry/extensions/__init__.py,sha256=2TXnEVXumViXzBe-9ppb0CX90Wbc6644IE7aJQAEAXs,1308
95
96
  strawberry/extensions/add_validation_rules.py,sha256=YwC_27jUpQ6DWcCB1RsuE1JD8R5rV7LAu5fVjdLchYs,1358
96
97
  strawberry/extensions/base_extension.py,sha256=ihsbUrhYt-x4X1j5a34FASmNF661Xev-3w4Qc5gUbHw,2351
@@ -115,7 +116,7 @@ strawberry/extensions/utils.py,sha256=sjhxItHzbDhqHtnR63WbE35qzHhTyf9NSffidet79H
115
116
  strawberry/extensions/validation_cache.py,sha256=Fp0bz0HfbMVjaOVfTyetR7Knhic0tthkzB_0kOOyJY0,1447
116
117
  strawberry/fastapi/__init__.py,sha256=p5qg9AlkYjNOWKcT4uRiebIpR6pIb1HqDMiDfF5O3tg,147
117
118
  strawberry/fastapi/context.py,sha256=O_cDNppfUJJecM0ZU_RJ-dhdF0o1x39JfYvYg-7uob4,684
118
- strawberry/fastapi/router.py,sha256=i1V_Q7Lkff7tOG7Q4P2xzm5Of7YyWE2_PVUnfpbFytw,12033
119
+ strawberry/fastapi/router.py,sha256=h_A42Sks-ygEODWolzKmGxX0fRzL19FOBLLOQGQPupc,12049
119
120
  strawberry/federation/__init__.py,sha256=Pw01N0rG9o0NaUxXLMNGeW5oLENeWVx_d8Kuef1ES4s,549
120
121
  strawberry/federation/argument.py,sha256=rs71S1utiNUd4XOLRa9KVtSMA3yqvKJnR_qdJqX6PPM,860
121
122
  strawberry/federation/enum.py,sha256=geyNA00IjUBroBc6EFrTK0n6DGIVyKOeSE_3aqiwUaQ,3151
@@ -137,7 +138,7 @@ strawberry/flask/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
137
138
  strawberry/flask/views.py,sha256=eFB9s-gVNw8xEmHlxAkiMRlK2CCojQlDrPTf7aVsZvY,4579
138
139
  strawberry/http/__init__.py,sha256=8UWXKZ2IG6_nInp9liUj0qMquDNRR-9o--0EMBL-gnQ,1482
139
140
  strawberry/http/async_base_view.py,sha256=IGB5b_L6tTnCD_fNhLeCLu5q_KxdgWGfDQo-PiZDHPw,25596
140
- strawberry/http/base.py,sha256=TxvzTtHPrRTCQfJK5pbSXCE2AezT2gpKBRrN58a5Mmc,3215
141
+ strawberry/http/base.py,sha256=_QDvnorSvHj1RaV8sd7PMFY2cKwMJYjfd7w7wWq6wkY,3280
141
142
  strawberry/http/exceptions.py,sha256=5uud0ZijcMC7TS9iiqMTre9DVIe04judh8E8nSbwxy8,258
142
143
  strawberry/http/ides.py,sha256=WjU0nsMDgr3Bd1ebWkUEkO2d1hk0dI16mLqXyCHqklA,613
143
144
  strawberry/http/parse_content_type.py,sha256=CYHO8F9b9DP1gJ1xxPjc9L2GkBwsyC1O_GCEp1QOuG0,381
@@ -146,7 +147,7 @@ strawberry/http/temporal_response.py,sha256=HTt65g-YxqlPGxjqvH5bzGoU1b3CctVR-9cm
146
147
  strawberry/http/types.py,sha256=H0wGOdCO-5tNKZM_6cAtNRwZAjoEXnAC5N0Q7b70AtU,398
147
148
  strawberry/http/typevars.py,sha256=Uu6NkKe3h7o29ZWwldq6sJy4ioSSeXODTCDRvY2hUpE,489
148
149
  strawberry/litestar/__init__.py,sha256=zsXzg-mglCGUVO9iNXLm-yadoDSCK7k-zuyRqyvAh1w,237
149
- strawberry/litestar/controller.py,sha256=uYHkfcys2NGvCRGnWK9rOs5rgpETS6h6Y2ACost5Yxg,13022
150
+ strawberry/litestar/controller.py,sha256=BPRcARoQ7eeRihyQ88Pj0FYfJ_SR6fnffsyhKBRWAY0,13038
150
151
  strawberry/parent.py,sha256=JYFp-HGCgwbH2oB4uLSiIO4cVsoPaxX6lfYmxOKPkSg,1362
151
152
  strawberry/permission.py,sha256=dSRJMjSCmTlXfvfC24kCSrAk0txTjYKTJ5ZVU5IW91Y,7537
152
153
  strawberry/printer/__init__.py,sha256=DmepjmgtkdF5RxK_7yC6qUyRWn56U-9qeZMbkztYB9w,62
@@ -154,7 +155,7 @@ strawberry/printer/ast_from_value.py,sha256=Tkme60qlykbN2m3dNPNMOe65X-wj6EmcDQwg
154
155
  strawberry/printer/printer.py,sha256=5E9w0wDsUv1hvkeXof12277NLMiCVy5MgJ6gSo_NJhQ,19177
155
156
  strawberry/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
157
  strawberry/quart/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
- strawberry/quart/views.py,sha256=hgUAyGh8R3Js3mLIWevhvRWewbyiUAwbUIp5A_R7v_c,6562
158
+ strawberry/quart/views.py,sha256=wCW8pEIbKTIre-ktR-xeXevOZxAAnRUUlRdsoKt2Luw,6578
158
159
  strawberry/relay/__init__.py,sha256=Vi4btvA_g6Cj9Tk_F9GCSegapIf2WqkOWV8y3P0cTCs,553
159
160
  strawberry/relay/exceptions.py,sha256=Za0iXLBGZtd1HkesGm4xTr3QOeuyiCAe1hiCCQ2HHvE,4036
160
161
  strawberry/relay/fields.py,sha256=eqQOH8JAWZUP52nwaYCZ_z5Jvp69_T_gx1pxjrdgV1k,18284
@@ -167,7 +168,7 @@ strawberry/sanic/utils.py,sha256=XjUVBFuBWfECBCZbx_YtrjQnFTUyIGTo7aISIeB22Gc,100
167
168
  strawberry/sanic/views.py,sha256=8Tl5pMYnbaju7WYxJImtJTwVi2XZBKWEwnSB-tYbZGw,5682
168
169
  strawberry/scalars.py,sha256=CGkG8CIfurXiYhidmW3qwy6M5BF_Mhih3wAEcWx_iBU,2278
169
170
  strawberry/schema/__init__.py,sha256=u1QCyDVQExUVDA20kyosKPz3TS5HMCN2NrXclhiFAL4,92
170
- strawberry/schema/_graphql_core.py,sha256=_ubCP_4ZZ1KwZGLlHTPPcUVPk_hDh6EOp2FxjCfyKxM,1642
171
+ strawberry/schema/_graphql_core.py,sha256=kvUhY5Z8e9aLvDX0lsjU78ZidTpnrFFe_mS0fW3O6VI,1702
171
172
  strawberry/schema/base.py,sha256=wqvEOQ_aVkfebk9SlG9zg1YXl3MlwxGZhxFRoIkAxu0,4053
172
173
  strawberry/schema/compat.py,sha256=xNpOEDfi-MODpplMGaKuKeQIVcr-tcAaKaU3TlBc1Zs,1873
173
174
  strawberry/schema/config.py,sha256=bkEMn0EkBRg2Tl6ZZH5hpOGBNiAw9QcOclt5dI_Yd1g,1217
@@ -209,11 +210,11 @@ strawberry/types/base.py,sha256=Bfa-5Wen8qR7m6tlSMRRGlGE-chRGMHjQMopfNdbbrk,1519
209
210
  strawberry/types/cast.py,sha256=fx86MkLW77GIximBAwUk5vZxSGwDqUA6XicXvz8EXwQ,916
210
211
  strawberry/types/enum.py,sha256=7bK7YUzlG117_V9x-f9hx5vogcCRF6UBUFteeKhjDHg,6306
211
212
  strawberry/types/execution.py,sha256=_Rl4akU174P_2mq3x1N1QTj0LgJn3CQ43hPFzN3rs_s,4075
212
- strawberry/types/field.py,sha256=8FRKetfwJkRaWDVpKgHQpyBKnDBarcsnZQz5Gs8if0w,20664
213
+ strawberry/types/field.py,sha256=u5Gh3AbaruSkGn8P2EnKhX98OzRXmPR8VAh59fhx6eE,20648
213
214
  strawberry/types/fields/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
214
215
  strawberry/types/fields/resolver.py,sha256=b6lxfw6AMOUFWm7vs7a9KzNkpR8b_S110DoIosrrWDQ,14679
215
216
  strawberry/types/graphql.py,sha256=gXKzawwKiow7hvoJhq5ApNJOMUCnKmvTiHaKY5CK1Lw,867
216
- strawberry/types/info.py,sha256=V3DQMd97tkWSdPIhp7HcelQ2h94-HSCI5zJ7cRO7i58,4907
217
+ strawberry/types/info.py,sha256=F-1AwVvxHEs2KF9Nw7dCML_Qx3B-iGu4tsYGQ16cK3k,4891
217
218
  strawberry/types/lazy_type.py,sha256=dlP9VcMjZc9sdgriiQGzOZa0TToB6Ee7zpIP8h7TLC0,5079
218
219
  strawberry/types/maybe.py,sha256=3TEY0S2qT_unEdYlPUW50HBuOIIaploZVy3JWpXdeeE,1161
219
220
  strawberry/types/mutation.py,sha256=cg-_O2WWnZ-GSwOIv0toSdxlGeY2lhBBxZ24AifJuSM,11978
@@ -229,16 +230,15 @@ strawberry/utils/aio.py,sha256=Nry5jxFHvipGS1CwX5VvFS2YQ6_bp-_cewnI6v9A7-A,2226
229
230
  strawberry/utils/await_maybe.py,sha256=YdjfuzjDVjph0VH0WkwvU4ezsjl_fELnGrLC1_bvb_U,449
230
231
  strawberry/utils/dataclasses.py,sha256=1wvVq0vgvjrRSamJ3CBJpkLu1KVweTmw5JLXmagdGes,856
231
232
  strawberry/utils/deprecations.py,sha256=Yrp4xBzp36mQprH8qPHpPMhkCLm527q7XU7pP4aar_0,782
232
- strawberry/utils/graphql_lexer.py,sha256=JUVJrJ6Ax0t7m6-DTWFzf4cvXrC02VPmL1NS2zMEMbY,1255
233
233
  strawberry/utils/importer.py,sha256=NtTgNaNSW4TnlLo_S34nxXq14RxUAec-QlEZ0LON28M,629
234
234
  strawberry/utils/inspect.py,sha256=-aFT65PkQ9KXo5w8Q2uveBJ8jEpi40sTqRipRQVdYR8,3406
235
235
  strawberry/utils/locate_definition.py,sha256=raABxyWE9MkhO5_w5tO8_xKHSZumRJCJt1QY1OgHO-M,1429
236
236
  strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,746
237
237
  strawberry/utils/operation.py,sha256=ZgVOw3K2jQuLjNOYUHauF7itJD0QDNoPw9PBi0IYf6k,1234
238
238
  strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
239
- strawberry/utils/typing.py,sha256=SDvX-Du-9HAV3-XXjqi7Q5f5qPDDFd_gASIITiwBQT4,14073
240
- strawberry_graphql-0.282.0.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
241
- strawberry_graphql-0.282.0.dist-info/METADATA,sha256=V997csv_7Je1S5Bk7JlMN2pVd9eTNENIoCQogatt2MQ,7426
242
- strawberry_graphql-0.282.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
243
- strawberry_graphql-0.282.0.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
244
- strawberry_graphql-0.282.0.dist-info/RECORD,,
239
+ strawberry/utils/typing.py,sha256=_M4ym89L_oquv3kxaRajshOoDJE-mj2hyCAs1quRmGA,14020
240
+ strawberry_graphql-0.283.1.dist-info/METADATA,sha256=96SXgEQH3ER-m1XgB6MtoSSIVqbPeXQnlzNviStNB0A,7652
241
+ strawberry_graphql-0.283.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
242
+ strawberry_graphql-0.283.1.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
243
+ strawberry_graphql-0.283.1.dist-info/licenses/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
244
+ strawberry_graphql-0.283.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,35 +0,0 @@
1
- from typing import Any, ClassVar
2
-
3
- from pygments import token
4
- from pygments.lexer import RegexLexer
5
-
6
-
7
- class GraphQLLexer(RegexLexer):
8
- """GraphQL Lexer for Pygments, used by the debug server."""
9
-
10
- name = "GraphQL"
11
- aliases: ClassVar[list[str]] = ["graphql", "gql"]
12
- filenames: ClassVar[list[str]] = ["*.graphql", "*.gql"]
13
- mimetypes: ClassVar[list[str]] = ["application/graphql"]
14
-
15
- tokens: ClassVar[dict[str, list[tuple[str, Any]]]] = {
16
- "root": [
17
- (r"#.*", token.Comment.Singline),
18
- (r"\.\.\.", token.Operator),
19
- (r'"[\u0009\u000A\u000D\u0020-\uFFFF]*"', token.String.Double),
20
- (
21
- r"(-?0|-?[1-9][0-9]*)(\.[0-9]+[eE][+-]?[0-9]+|\.[0-9]+|[eE][+-]?[0-9]+)",
22
- token.Number.Float,
23
- ),
24
- (r"(-?0|-?[1-9][0-9]*)", token.Number.Integer),
25
- (r"\$+[_A-Za-z][_0-9A-Za-z]*", token.Name.Variable),
26
- (r"[_A-Za-z][_0-9A-Za-z]+\s?:", token.Text),
27
- (r"(type|query|mutation|@[a-z]+|on|true|false|null)\b", token.Keyword.Type),
28
- (r"[!$():=@\[\]{|}]+?", token.Punctuation),
29
- (r"[_A-Za-z][_0-9A-Za-z]*", token.Keyword),
30
- (r"(\s|,)", token.Text),
31
- ]
32
- }
33
-
34
-
35
- __all__ = ["GraphQLLexer"]