strawberry-graphql 0.214.0.dev1699441271__tar.gz → 0.214.0.dev1701082152__tar.gz
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_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/PKG-INFO +1 -1
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/pyproject.toml +1 -1
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/views.py +1 -35
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/__init__.py +1 -19
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/http_handler.py +9 -43
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/views.py +7 -25
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/router.py +0 -13
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/flask/views.py +1 -9
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/async_base_view.py +2 -101
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/views.py +0 -24
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/base.py +2 -6
- strawberry_graphql-0.214.0.dev1701082152/strawberry/schema/execute.py +266 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/schema.py +2 -2
- strawberry_graphql-0.214.0.dev1701082152/strawberry/types/__init__.py +4 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/execution.py +1 -11
- strawberry_graphql-0.214.0.dev1699441271/strawberry/schema/execute.py +0 -275
- strawberry_graphql-0.214.0.dev1699441271/strawberry/types/__init__.py +0 -9
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/LICENSE +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/README.md +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/arguments.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/auto.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/custom_scalar.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/enum.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/sentry.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/lazy_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/mutation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/object_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/private.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/controller.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/type.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/types.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/union.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/unset.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/typing.py +0 -0
{strawberry_graphql-0.214.0.dev1699441271 → strawberry_graphql-0.214.0.dev1701082152}/pyproject.toml
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "strawberry-graphql"
|
3
3
|
packages = [ { include = "strawberry" } ]
|
4
|
-
version = "0.214.0.dev.
|
4
|
+
version = "0.214.0.dev.1701082152"
|
5
5
|
description = "A library for creating GraphQL APIs"
|
6
6
|
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
7
|
license = "MIT"
|
@@ -7,13 +7,10 @@ from io import BytesIO
|
|
7
7
|
from typing import (
|
8
8
|
TYPE_CHECKING,
|
9
9
|
Any,
|
10
|
-
AsyncGenerator,
|
11
|
-
Callable,
|
12
10
|
Dict,
|
13
11
|
Iterable,
|
14
12
|
Mapping,
|
15
13
|
Optional,
|
16
|
-
Union,
|
17
14
|
cast,
|
18
15
|
)
|
19
16
|
|
@@ -78,13 +75,7 @@ class AioHTTPRequestAdapter(AsyncHTTPRequestAdapter):
|
|
78
75
|
|
79
76
|
|
80
77
|
class GraphQLView(
|
81
|
-
AsyncBaseHTTPView[
|
82
|
-
web.Request,
|
83
|
-
Union[web.Response, web.StreamResponse],
|
84
|
-
web.Response,
|
85
|
-
Context,
|
86
|
-
RootValue,
|
87
|
-
]
|
78
|
+
AsyncBaseHTTPView[web.Request, web.Response, web.Response, Context, RootValue]
|
88
79
|
):
|
89
80
|
# Mark the view as coroutine so that AIOHTTP does not confuse it with a deprecated
|
90
81
|
# bare handler function.
|
@@ -140,8 +131,6 @@ class GraphQLView(
|
|
140
131
|
|
141
132
|
if not ws_test.ok:
|
142
133
|
try:
|
143
|
-
# TODO: pass this down from run to multipart thingy
|
144
|
-
self.request = request
|
145
134
|
return await self.run(request=request)
|
146
135
|
except HTTPException as e:
|
147
136
|
return web.Response(
|
@@ -188,26 +177,3 @@ class GraphQLView(
|
|
188
177
|
sub_response.content_type = "application/json"
|
189
178
|
|
190
179
|
return sub_response
|
191
|
-
|
192
|
-
async def create_multipart_response(
|
193
|
-
self,
|
194
|
-
stream: Callable[[], AsyncGenerator[str, None]],
|
195
|
-
sub_response: web.Response,
|
196
|
-
) -> web.StreamResponse:
|
197
|
-
# TODO: use sub response
|
198
|
-
response = web.StreamResponse(
|
199
|
-
status=200,
|
200
|
-
headers={
|
201
|
-
"Transfer-Encoding": "chunked",
|
202
|
-
"Content-type": "multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
203
|
-
},
|
204
|
-
reason="OK",
|
205
|
-
)
|
206
|
-
|
207
|
-
await response.prepare(self.request)
|
208
|
-
|
209
|
-
async for data in stream():
|
210
|
-
await response.write(data.encode())
|
211
|
-
|
212
|
-
await response.write_eof()
|
213
|
-
return response
|
@@ -5,8 +5,6 @@ from datetime import timedelta
|
|
5
5
|
from typing import (
|
6
6
|
TYPE_CHECKING,
|
7
7
|
Any,
|
8
|
-
AsyncIterator,
|
9
|
-
Callable,
|
10
8
|
Mapping,
|
11
9
|
Optional,
|
12
10
|
Sequence,
|
@@ -16,12 +14,7 @@ from typing import (
|
|
16
14
|
|
17
15
|
from starlette import status
|
18
16
|
from starlette.requests import Request
|
19
|
-
from starlette.responses import
|
20
|
-
HTMLResponse,
|
21
|
-
PlainTextResponse,
|
22
|
-
Response,
|
23
|
-
StreamingResponse,
|
24
|
-
)
|
17
|
+
from starlette.responses import HTMLResponse, PlainTextResponse, Response
|
25
18
|
from starlette.websockets import WebSocket
|
26
19
|
|
27
20
|
from strawberry.asgi.handlers import (
|
@@ -220,14 +213,3 @@ class GraphQL(
|
|
220
213
|
response.status_code = sub_response.status_code
|
221
214
|
|
222
215
|
return response
|
223
|
-
|
224
|
-
async def create_multipart_response(
|
225
|
-
self, stream: Callable[[], AsyncIterator[str]], sub_response: Response
|
226
|
-
) -> Response:
|
227
|
-
return StreamingResponse(
|
228
|
-
stream(),
|
229
|
-
headers={
|
230
|
-
"Transfer-Encoding": "chunked",
|
231
|
-
"Content-type": "multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
232
|
-
},
|
233
|
-
)
|
@@ -9,16 +9,7 @@ import json
|
|
9
9
|
import warnings
|
10
10
|
from functools import cached_property
|
11
11
|
from io import BytesIO
|
12
|
-
from typing import
|
13
|
-
TYPE_CHECKING,
|
14
|
-
Any,
|
15
|
-
AsyncGenerator,
|
16
|
-
Callable,
|
17
|
-
Dict,
|
18
|
-
Mapping,
|
19
|
-
Optional,
|
20
|
-
Union,
|
21
|
-
)
|
12
|
+
from typing import TYPE_CHECKING, Any, Dict, Mapping, Optional, Union
|
22
13
|
from urllib.parse import parse_qs
|
23
14
|
|
24
15
|
from django.conf import settings
|
@@ -52,14 +43,6 @@ class ChannelsResponse:
|
|
52
43
|
headers: Dict[bytes, bytes] = dataclasses.field(default_factory=dict)
|
53
44
|
|
54
45
|
|
55
|
-
@dataclasses.dataclass
|
56
|
-
class MultipartChannelsResponse:
|
57
|
-
stream: Callable[[], AsyncGenerator[str, None]]
|
58
|
-
status: int = 200
|
59
|
-
content_type: str = "multipart/mixed;boundary=graphql;subscriptionSpec=1.0"
|
60
|
-
headers: Dict[bytes, bytes] = dataclasses.field(default_factory=dict)
|
61
|
-
|
62
|
-
|
63
46
|
@dataclasses.dataclass
|
64
47
|
class ChannelsRequest:
|
65
48
|
consumer: ChannelsConsumer
|
@@ -202,25 +185,16 @@ class BaseGraphQLHTTPConsumer(ChannelsConsumer, AsyncHttpConsumer):
|
|
202
185
|
async def handle(self, body: bytes) -> None:
|
203
186
|
request = ChannelsRequest(consumer=self, body=body)
|
204
187
|
try:
|
205
|
-
response = await self.run(request)
|
188
|
+
response: ChannelsResponse = await self.run(request)
|
206
189
|
|
207
190
|
if b"Content-Type" not in response.headers:
|
208
191
|
response.headers[b"Content-Type"] = response.content_type.encode()
|
209
192
|
|
210
|
-
|
211
|
-
response.
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
# TODO: we should change more body
|
216
|
-
await self.send_body(chunk.encode("utf-8"), more_body=True)
|
217
|
-
|
218
|
-
else:
|
219
|
-
await self.send_response(
|
220
|
-
response.status,
|
221
|
-
response.content,
|
222
|
-
headers=response.headers,
|
223
|
-
)
|
193
|
+
await self.send_response(
|
194
|
+
response.status,
|
195
|
+
response.content,
|
196
|
+
headers=response.headers,
|
197
|
+
)
|
224
198
|
except HTTPException as e:
|
225
199
|
await self.send_response(e.status_code, e.reason.encode())
|
226
200
|
|
@@ -229,7 +203,7 @@ class GraphQLHTTPConsumer(
|
|
229
203
|
BaseGraphQLHTTPConsumer,
|
230
204
|
AsyncBaseHTTPView[
|
231
205
|
ChannelsRequest,
|
232
|
-
|
206
|
+
ChannelsResponse,
|
233
207
|
TemporalResponse,
|
234
208
|
Context,
|
235
209
|
RootValue,
|
@@ -273,14 +247,6 @@ class GraphQLHTTPConsumer(
|
|
273
247
|
async def get_sub_response(self, request: ChannelsRequest) -> TemporalResponse:
|
274
248
|
return TemporalResponse()
|
275
249
|
|
276
|
-
async def create_multipart_response(
|
277
|
-
self,
|
278
|
-
stream: Callable[[], AsyncGenerator[str, None]],
|
279
|
-
sub_response: TemporalResponse,
|
280
|
-
) -> MultipartChannelsResponse:
|
281
|
-
# TODO: sub response
|
282
|
-
return MultipartChannelsResponse(stream=stream)
|
283
|
-
|
284
250
|
async def render_graphql_ide(self, request: ChannelsRequest) -> ChannelsResponse:
|
285
251
|
return ChannelsResponse(
|
286
252
|
content=self.graphql_ide_html.encode(), content_type="text/html"
|
@@ -335,5 +301,5 @@ class SyncGraphQLHTTPConsumer(
|
|
335
301
|
request: ChannelsRequest,
|
336
302
|
context: Optional[Context] = UNSET,
|
337
303
|
root_value: Optional[RootValue] = UNSET,
|
338
|
-
) -> ChannelsResponse:
|
304
|
+
) -> ChannelsResponse:
|
339
305
|
return super().run(request, context, root_value)
|
@@ -5,7 +5,6 @@ import warnings
|
|
5
5
|
from typing import (
|
6
6
|
TYPE_CHECKING,
|
7
7
|
Any,
|
8
|
-
AsyncIterator,
|
9
8
|
Callable,
|
10
9
|
Mapping,
|
11
10
|
Optional,
|
@@ -14,14 +13,8 @@ from typing import (
|
|
14
13
|
)
|
15
14
|
|
16
15
|
from asgiref.sync import markcoroutinefunction
|
17
|
-
from django.http import
|
18
|
-
|
19
|
-
HttpResponse,
|
20
|
-
HttpResponseNotAllowed,
|
21
|
-
JsonResponse,
|
22
|
-
StreamingHttpResponse,
|
23
|
-
)
|
24
|
-
from django.http.response import HttpResponseBase
|
16
|
+
from django.http import HttpRequest, HttpResponseNotAllowed, JsonResponse
|
17
|
+
from django.http.response import HttpResponse
|
25
18
|
from django.template import RequestContext, Template
|
26
19
|
from django.template.exceptions import TemplateDoesNotExist
|
27
20
|
from django.template.loader import render_to_string
|
@@ -165,7 +158,7 @@ class BaseView:
|
|
165
158
|
|
166
159
|
def create_response(
|
167
160
|
self, response_data: GraphQLHTTPResponse, sub_response: HttpResponse
|
168
|
-
) ->
|
161
|
+
) -> HttpResponse:
|
169
162
|
data = self.encode_json(response_data) # type: ignore
|
170
163
|
|
171
164
|
response = HttpResponse(
|
@@ -184,22 +177,11 @@ class BaseView:
|
|
184
177
|
|
185
178
|
return response
|
186
179
|
|
187
|
-
async def create_multipart_response(
|
188
|
-
self, stream: Callable[[], AsyncIterator[Any]], sub_response: HttpResponse
|
189
|
-
) -> HttpResponseBase:
|
190
|
-
return StreamingHttpResponse(
|
191
|
-
streaming_content=stream(),
|
192
|
-
headers={
|
193
|
-
"Transfer-Encoding": "chunked",
|
194
|
-
"Content-type": "multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
195
|
-
},
|
196
|
-
)
|
197
|
-
|
198
180
|
|
199
181
|
class GraphQLView(
|
200
182
|
BaseView,
|
201
183
|
SyncBaseHTTPView[
|
202
|
-
HttpRequest,
|
184
|
+
HttpRequest, HttpResponse, TemporalHttpResponse, Context, RootValue
|
203
185
|
],
|
204
186
|
View,
|
205
187
|
):
|
@@ -222,7 +204,7 @@ class GraphQLView(
|
|
222
204
|
@method_decorator(csrf_exempt)
|
223
205
|
def dispatch(
|
224
206
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
225
|
-
) -> Union[HttpResponseNotAllowed, TemplateResponse,
|
207
|
+
) -> Union[HttpResponseNotAllowed, TemplateResponse, HttpResponse]:
|
226
208
|
try:
|
227
209
|
return self.run(request=request)
|
228
210
|
except HTTPException as e:
|
@@ -248,7 +230,7 @@ class GraphQLView(
|
|
248
230
|
class AsyncGraphQLView(
|
249
231
|
BaseView,
|
250
232
|
AsyncBaseHTTPView[
|
251
|
-
HttpRequest,
|
233
|
+
HttpRequest, HttpResponse, TemporalHttpResponse, Context, RootValue
|
252
234
|
],
|
253
235
|
View,
|
254
236
|
):
|
@@ -281,7 +263,7 @@ class AsyncGraphQLView(
|
|
281
263
|
@method_decorator(csrf_exempt)
|
282
264
|
async def dispatch( # pyright: ignore
|
283
265
|
self, request: HttpRequest, *args: Any, **kwargs: Any
|
284
|
-
) -> Union[HttpResponseNotAllowed, TemplateResponse,
|
266
|
+
) -> Union[HttpResponseNotAllowed, TemplateResponse, HttpResponse]:
|
285
267
|
try:
|
286
268
|
return await self.run(request=request)
|
287
269
|
except HTTPException as e:
|
@@ -6,7 +6,6 @@ from inspect import signature
|
|
6
6
|
from typing import (
|
7
7
|
TYPE_CHECKING,
|
8
8
|
Any,
|
9
|
-
AsyncIterator,
|
10
9
|
Awaitable,
|
11
10
|
Callable,
|
12
11
|
Mapping,
|
@@ -23,7 +22,6 @@ from starlette.responses import (
|
|
23
22
|
HTMLResponse,
|
24
23
|
PlainTextResponse,
|
25
24
|
Response,
|
26
|
-
StreamingResponse,
|
27
25
|
)
|
28
26
|
from starlette.websockets import WebSocket
|
29
27
|
|
@@ -324,14 +322,3 @@ class GraphQLRouter(
|
|
324
322
|
response.headers.raw.extend(sub_response.headers.raw)
|
325
323
|
|
326
324
|
return response
|
327
|
-
|
328
|
-
async def create_multipart_response(
|
329
|
-
self, stream: Callable[[], AsyncIterator[str]], sub_response: Response
|
330
|
-
) -> Response:
|
331
|
-
return StreamingResponse(
|
332
|
-
stream(),
|
333
|
-
headers={
|
334
|
-
"Transfer-Encoding": "chunked",
|
335
|
-
"Content-type": "multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
336
|
-
},
|
337
|
-
)
|
@@ -1,15 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import warnings
|
4
|
-
from typing import
|
5
|
-
TYPE_CHECKING,
|
6
|
-
Any,
|
7
|
-
List,
|
8
|
-
Mapping,
|
9
|
-
Optional,
|
10
|
-
Union,
|
11
|
-
cast,
|
12
|
-
)
|
4
|
+
from typing import TYPE_CHECKING, Any, List, Mapping, Optional, Union, cast
|
13
5
|
|
14
6
|
from flask import Request, Response, render_template_string, request
|
15
7
|
from flask.views import View
|
@@ -1,16 +1,12 @@
|
|
1
1
|
import abc
|
2
|
-
import asyncio
|
3
2
|
import json
|
4
3
|
from typing import (
|
5
|
-
Any,
|
6
|
-
AsyncGenerator,
|
7
4
|
Callable,
|
8
5
|
Dict,
|
9
6
|
Generic,
|
10
7
|
List,
|
11
8
|
Mapping,
|
12
9
|
Optional,
|
13
|
-
Tuple,
|
14
10
|
Union,
|
15
11
|
)
|
16
12
|
|
@@ -23,7 +19,7 @@ from strawberry.http import GraphQLHTTPResponse, GraphQLRequestData, process_res
|
|
23
19
|
from strawberry.http.ides import GraphQL_IDE
|
24
20
|
from strawberry.schema.base import BaseSchema
|
25
21
|
from strawberry.schema.exceptions import InvalidOperationTypeError
|
26
|
-
from strawberry.types import ExecutionResult
|
22
|
+
from strawberry.types import ExecutionResult
|
27
23
|
from strawberry.types.graphql import OperationType
|
28
24
|
|
29
25
|
from .base import BaseView
|
@@ -98,14 +94,9 @@ class AsyncBaseHTTPView(
|
|
98
94
|
async def render_graphql_ide(self, request: Request) -> Response:
|
99
95
|
...
|
100
96
|
|
101
|
-
async def create_multipart_response(
|
102
|
-
self, stream: Callable[[], AsyncGenerator[str, None]], sub_response: SubResponse
|
103
|
-
) -> Response:
|
104
|
-
raise ValueError("Multipart responses are not supported")
|
105
|
-
|
106
97
|
async def execute_operation(
|
107
98
|
self, request: Request, context: Context, root_value: Optional[RootValue]
|
108
|
-
) ->
|
99
|
+
) -> ExecutionResult:
|
109
100
|
request_adapter = self.request_adapter_class(request)
|
110
101
|
|
111
102
|
try:
|
@@ -201,11 +192,6 @@ class AsyncBaseHTTPView(
|
|
201
192
|
except MissingQueryError as e:
|
202
193
|
raise HTTPException(400, "No GraphQL query found in the request") from e
|
203
194
|
|
204
|
-
if isinstance(result, SubscriptionExecutionResult):
|
205
|
-
stream = self._get_stream(request, result)
|
206
|
-
|
207
|
-
return await self.create_multipart_response(stream, sub_response)
|
208
|
-
|
209
195
|
response_data = await self.process_result(request=request, result=result)
|
210
196
|
|
211
197
|
if result.errors:
|
@@ -215,88 +201,6 @@ class AsyncBaseHTTPView(
|
|
215
201
|
response_data=response_data, sub_response=sub_response
|
216
202
|
)
|
217
203
|
|
218
|
-
def encode_multipart_data(self, data: Any, separator: str) -> str:
|
219
|
-
return "".join(
|
220
|
-
[
|
221
|
-
f"\r\n--{separator}\r\n",
|
222
|
-
"Content-Type: application/json\r\n\r\n",
|
223
|
-
self.encode_json(data),
|
224
|
-
"\n",
|
225
|
-
]
|
226
|
-
)
|
227
|
-
|
228
|
-
def _stream_with_heartbeat(
|
229
|
-
self, stream: Callable[[], AsyncGenerator[str, None]]
|
230
|
-
) -> Callable[[], AsyncGenerator[str, None]]:
|
231
|
-
"""Adds a heartbeat to the stream, to prevent the connection from closing
|
232
|
-
when there are no messages being sent."""
|
233
|
-
# TODO: handle errors
|
234
|
-
# TODO: should we do this more efficiently? and only send the heartbeat when
|
235
|
-
# 5 seconds have passed after the last message? (apollo router doesn't seem to do this)
|
236
|
-
queue = asyncio.Queue[Tuple[bool, Any]](1)
|
237
|
-
|
238
|
-
cancelling = False
|
239
|
-
|
240
|
-
async def drain():
|
241
|
-
try:
|
242
|
-
async for item in stream():
|
243
|
-
await queue.put((False, item))
|
244
|
-
except Exception as e:
|
245
|
-
if not cancelling:
|
246
|
-
await queue.put((True, e))
|
247
|
-
else:
|
248
|
-
raise
|
249
|
-
|
250
|
-
async def heartbeat():
|
251
|
-
while True:
|
252
|
-
await queue.put((False, self.encode_multipart_data({}, "graphql")))
|
253
|
-
|
254
|
-
await asyncio.sleep(5)
|
255
|
-
|
256
|
-
async def merged() -> AsyncGenerator[str, None]:
|
257
|
-
heartbeat_task = asyncio.create_task(heartbeat())
|
258
|
-
task = asyncio.create_task(drain())
|
259
|
-
|
260
|
-
def cancel_tasks():
|
261
|
-
nonlocal cancelling
|
262
|
-
cancelling = True
|
263
|
-
task.cancel()
|
264
|
-
heartbeat_task.cancel()
|
265
|
-
|
266
|
-
try:
|
267
|
-
while not task.done():
|
268
|
-
raised, data = await queue.get()
|
269
|
-
|
270
|
-
if raised:
|
271
|
-
cancel_tasks()
|
272
|
-
raise data
|
273
|
-
|
274
|
-
yield data
|
275
|
-
finally:
|
276
|
-
cancel_tasks()
|
277
|
-
|
278
|
-
return merged
|
279
|
-
|
280
|
-
def _get_stream(
|
281
|
-
self,
|
282
|
-
request: Request,
|
283
|
-
result: SubscriptionExecutionResult,
|
284
|
-
separator: str = "graphql",
|
285
|
-
) -> Callable[[], AsyncGenerator[str, None]]:
|
286
|
-
async def stream():
|
287
|
-
async for value in result:
|
288
|
-
response = await self.process_result(request, value)
|
289
|
-
yield self.encode_multipart_data({"payload": response}, separator)
|
290
|
-
|
291
|
-
yield f"\r\n--{separator}--\r\n"
|
292
|
-
|
293
|
-
return self._stream_with_heartbeat(stream)
|
294
|
-
|
295
|
-
async def parse_multipart_subscriptions(
|
296
|
-
self, request: AsyncHTTPRequestAdapter
|
297
|
-
) -> Dict[str, str]:
|
298
|
-
return self.parse_json(await request.get_body())
|
299
|
-
|
300
204
|
async def parse_http_body(
|
301
205
|
self, request: AsyncHTTPRequestAdapter
|
302
206
|
) -> GraphQLRequestData:
|
@@ -306,9 +210,6 @@ class AsyncBaseHTTPView(
|
|
306
210
|
data = self.parse_json(await request.get_body())
|
307
211
|
elif content_type.startswith("multipart/form-data"):
|
308
212
|
data = await self.parse_multipart(request)
|
309
|
-
elif content_type.startswith("multipart/mixed"):
|
310
|
-
# TODO: do a check that checks if this is a multipart subscription
|
311
|
-
data = await self.parse_multipart_subscriptions(request)
|
312
213
|
elif request.method == "GET":
|
313
214
|
data = self.parse_query_params(request.query_params)
|
314
215
|
else:
|
@@ -5,8 +5,6 @@ import warnings
|
|
5
5
|
from typing import (
|
6
6
|
TYPE_CHECKING,
|
7
7
|
Any,
|
8
|
-
AsyncGenerator,
|
9
|
-
Callable,
|
10
8
|
Dict,
|
11
9
|
List,
|
12
10
|
Mapping,
|
@@ -170,35 +168,13 @@ class GraphQLView(
|
|
170
168
|
)
|
171
169
|
|
172
170
|
async def post(self, request: Request) -> HTTPResponse:
|
173
|
-
self.request = request
|
174
|
-
|
175
171
|
try:
|
176
172
|
return await self.run(request)
|
177
173
|
except HTTPException as e:
|
178
174
|
return HTTPResponse(e.reason, status=e.status_code)
|
179
175
|
|
180
176
|
async def get(self, request: Request) -> HTTPResponse:
|
181
|
-
self.request = request
|
182
177
|
try:
|
183
178
|
return await self.run(request)
|
184
179
|
except HTTPException as e:
|
185
180
|
return HTTPResponse(e.reason, status=e.status_code)
|
186
|
-
|
187
|
-
async def create_multipart_response(
|
188
|
-
self,
|
189
|
-
stream: Callable[[], AsyncGenerator[str, None]],
|
190
|
-
sub_response: TemporalResponse,
|
191
|
-
) -> HTTPResponse:
|
192
|
-
response = await self.request.respond(
|
193
|
-
content_type="multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
194
|
-
headers={
|
195
|
-
"Transfer-Encoding": "chunked",
|
196
|
-
},
|
197
|
-
)
|
198
|
-
|
199
|
-
async for chunk in stream():
|
200
|
-
await response.send(chunk)
|
201
|
-
|
202
|
-
await response.eof()
|
203
|
-
|
204
|
-
return response
|
@@ -14,11 +14,7 @@ if TYPE_CHECKING:
|
|
14
14
|
from strawberry.directive import StrawberryDirective
|
15
15
|
from strawberry.enum import EnumDefinition
|
16
16
|
from strawberry.schema.schema_converter import GraphQLCoreConverter
|
17
|
-
from strawberry.types import
|
18
|
-
ExecutionContext,
|
19
|
-
ExecutionResult,
|
20
|
-
SubscriptionExecutionResult,
|
21
|
-
)
|
17
|
+
from strawberry.types import ExecutionContext, ExecutionResult
|
22
18
|
from strawberry.types.graphql import OperationType
|
23
19
|
from strawberry.types.types import StrawberryObjectDefinition
|
24
20
|
from strawberry.union import StrawberryUnion
|
@@ -43,7 +39,7 @@ class BaseSchema(Protocol):
|
|
43
39
|
root_value: Optional[Any] = None,
|
44
40
|
operation_name: Optional[str] = None,
|
45
41
|
allowed_operation_types: Optional[Iterable[OperationType]] = None,
|
46
|
-
) ->
|
42
|
+
) -> ExecutionResult:
|
47
43
|
raise NotImplementedError
|
48
44
|
|
49
45
|
@abstractmethod
|