strawberry-graphql 0.253.1__tar.gz → 0.254.1__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.253.1 → strawberry_graphql-0.254.1}/PKG-INFO +1 -1
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/pyproject.toml +6 -2
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/__init__.py +8 -1
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/_compat.py +1 -1
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/async_base_view.py +24 -8
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/typevars.py +5 -5
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +36 -17
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +36 -12
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_ws/types.py +1 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/LICENSE +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/README.md +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codemods/update_imports.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/execute.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/schema.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/subscribe.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/arguments.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/auto.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/base.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/field.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/union.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/types/unset.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/utils/typing.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "strawberry-graphql"
|
3
3
|
packages = [ { include = "strawberry" } ]
|
4
|
-
version = "0.
|
4
|
+
version = "0.254.1"
|
5
5
|
description = "A library for creating GraphQL APIs"
|
6
6
|
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
7
|
license = "MIT"
|
@@ -76,7 +76,7 @@ pygments = "^2.3"
|
|
76
76
|
pyinstrument = {version = ">=4.0.0", optional = false}
|
77
77
|
pytest = "^7.2"
|
78
78
|
pytest-asyncio = ">=0.20.3"
|
79
|
-
pytest-codspeed = "
|
79
|
+
pytest-codspeed = { version = ">=3.0.0", python = ">=3.9" }
|
80
80
|
pytest-cov = "^4.0.0"
|
81
81
|
pytest-emoji = "^0.2.0"
|
82
82
|
pytest-mock = "^3.10"
|
@@ -100,6 +100,10 @@ poetry-plugin-export = "^1.6.0"
|
|
100
100
|
urllib3 = "<2"
|
101
101
|
graphlib_backport = {version = "*", python = "<3.9", optional = false}
|
102
102
|
inline-snapshot = "^0.10.1"
|
103
|
+
types-deprecated = "^1.2.15.20241117"
|
104
|
+
types-six = "^1.17.0.20241205"
|
105
|
+
types-pyyaml = "^6.0.12.20240917"
|
106
|
+
mypy = "^1.13.0"
|
103
107
|
|
104
108
|
[tool.poetry.group.integrations]
|
105
109
|
optional = true
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
from functools import cached_property
|
4
|
-
from typing import TYPE_CHECKING, Optional, Set, Union
|
4
|
+
from typing import TYPE_CHECKING, Dict, Optional, Set, Union
|
5
5
|
|
6
6
|
from graphql import GraphQLError
|
7
7
|
|
@@ -157,6 +157,13 @@ class StrawberryGraphQLError(GraphQLError):
|
|
157
157
|
"""Use it when you want to override the graphql.GraphQLError in custom extensions."""
|
158
158
|
|
159
159
|
|
160
|
+
class ConnectionRejectionError(Exception):
|
161
|
+
"""Use it when you want to reject a WebSocket connection."""
|
162
|
+
|
163
|
+
def __init__(self, payload: Dict[str, object] = {}) -> None:
|
164
|
+
self.payload = payload
|
165
|
+
|
166
|
+
|
160
167
|
__all__ = [
|
161
168
|
"StrawberryException",
|
162
169
|
"UnableToFindExceptionSource",
|
@@ -134,7 +134,7 @@ class PydanticV2Compat:
|
|
134
134
|
type_=field.annotation,
|
135
135
|
outer_type_=field.annotation,
|
136
136
|
default=field.default,
|
137
|
-
default_factory=field.default_factory,
|
137
|
+
default_factory=field.default_factory, # type: ignore
|
138
138
|
required=field.is_required(),
|
139
139
|
alias=field.alias,
|
140
140
|
# v2 doesn't have allow_none
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/http/async_base_view.py
RENAMED
@@ -13,6 +13,7 @@ from typing import (
|
|
13
13
|
Mapping,
|
14
14
|
Optional,
|
15
15
|
Tuple,
|
16
|
+
Type,
|
16
17
|
Union,
|
17
18
|
cast,
|
18
19
|
overload,
|
@@ -21,7 +22,6 @@ from typing_extensions import Literal, TypeGuard
|
|
21
22
|
|
22
23
|
from graphql import GraphQLError
|
23
24
|
|
24
|
-
from strawberry import UNSET
|
25
25
|
from strawberry.exceptions import MissingQueryError
|
26
26
|
from strawberry.file_uploads.utils import replace_placeholders_with_files
|
27
27
|
from strawberry.http import (
|
@@ -39,6 +39,7 @@ from strawberry.subscriptions.protocols.graphql_transport_ws.handlers import (
|
|
39
39
|
from strawberry.subscriptions.protocols.graphql_ws.handlers import BaseGraphQLWSHandler
|
40
40
|
from strawberry.types import ExecutionResult, SubscriptionExecutionResult
|
41
41
|
from strawberry.types.graphql import OperationType
|
42
|
+
from strawberry.types.unset import UNSET, UnsetType
|
42
43
|
|
43
44
|
from .base import BaseView
|
44
45
|
from .exceptions import HTTPException
|
@@ -116,11 +117,19 @@ class AsyncBaseHTTPView(
|
|
116
117
|
connection_init_wait_timeout: timedelta = timedelta(minutes=1)
|
117
118
|
request_adapter_class: Callable[[Request], AsyncHTTPRequestAdapter]
|
118
119
|
websocket_adapter_class: Callable[
|
119
|
-
[
|
120
|
+
[
|
121
|
+
"AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue]",
|
122
|
+
WebSocketRequest,
|
123
|
+
WebSocketResponse,
|
124
|
+
],
|
120
125
|
AsyncWebSocketAdapter,
|
121
126
|
]
|
122
|
-
graphql_transport_ws_handler_class
|
123
|
-
|
127
|
+
graphql_transport_ws_handler_class: Type[
|
128
|
+
BaseGraphQLTransportWSHandler[Context, RootValue]
|
129
|
+
] = BaseGraphQLTransportWSHandler[Context, RootValue]
|
130
|
+
graphql_ws_handler_class: Type[BaseGraphQLWSHandler[Context, RootValue]] = (
|
131
|
+
BaseGraphQLWSHandler[Context, RootValue]
|
132
|
+
)
|
124
133
|
|
125
134
|
@property
|
126
135
|
@abc.abstractmethod
|
@@ -279,18 +288,20 @@ class AsyncBaseHTTPView(
|
|
279
288
|
|
280
289
|
if websocket_subprotocol == GRAPHQL_TRANSPORT_WS_PROTOCOL:
|
281
290
|
await self.graphql_transport_ws_handler_class(
|
291
|
+
view=self,
|
282
292
|
websocket=websocket,
|
283
|
-
context=context,
|
284
|
-
root_value=root_value,
|
293
|
+
context=context, # type: ignore
|
294
|
+
root_value=root_value, # type: ignore
|
285
295
|
schema=self.schema,
|
286
296
|
debug=self.debug,
|
287
297
|
connection_init_wait_timeout=self.connection_init_wait_timeout,
|
288
298
|
).handle()
|
289
299
|
elif websocket_subprotocol == GRAPHQL_WS_PROTOCOL:
|
290
300
|
await self.graphql_ws_handler_class(
|
301
|
+
view=self,
|
291
302
|
websocket=websocket,
|
292
|
-
context=context,
|
293
|
-
root_value=root_value,
|
303
|
+
context=context, # type: ignore
|
304
|
+
root_value=root_value, # type: ignore
|
294
305
|
schema=self.schema,
|
295
306
|
debug=self.debug,
|
296
307
|
keep_alive=self.keep_alive,
|
@@ -476,5 +487,10 @@ class AsyncBaseHTTPView(
|
|
476
487
|
) -> GraphQLHTTPResponse:
|
477
488
|
return process_result(result)
|
478
489
|
|
490
|
+
async def on_ws_connect(
|
491
|
+
self, context: Context
|
492
|
+
) -> Union[UnsetType, None, Dict[str, object]]:
|
493
|
+
return UNSET
|
494
|
+
|
479
495
|
|
480
496
|
__all__ = ["AsyncBaseHTTPView"]
|
@@ -1,20 +1,20 @@
|
|
1
|
-
from
|
1
|
+
from typing_extensions import TypeVar
|
2
2
|
|
3
3
|
Request = TypeVar("Request", contravariant=True)
|
4
4
|
Response = TypeVar("Response")
|
5
5
|
SubResponse = TypeVar("SubResponse")
|
6
6
|
WebSocketRequest = TypeVar("WebSocketRequest")
|
7
7
|
WebSocketResponse = TypeVar("WebSocketResponse")
|
8
|
-
Context = TypeVar("Context")
|
9
|
-
RootValue = TypeVar("RootValue")
|
8
|
+
Context = TypeVar("Context", default=None)
|
9
|
+
RootValue = TypeVar("RootValue", default=None)
|
10
10
|
|
11
11
|
|
12
12
|
__all__ = [
|
13
|
+
"Context",
|
13
14
|
"Request",
|
14
15
|
"Response",
|
16
|
+
"RootValue",
|
15
17
|
"SubResponse",
|
16
18
|
"WebSocketRequest",
|
17
19
|
"WebSocketResponse",
|
18
|
-
"Context",
|
19
|
-
"RootValue",
|
20
20
|
]
|
@@ -5,8 +5,10 @@ import logging
|
|
5
5
|
from contextlib import suppress
|
6
6
|
from typing import (
|
7
7
|
TYPE_CHECKING,
|
8
|
+
Any,
|
8
9
|
Awaitable,
|
9
10
|
Dict,
|
11
|
+
Generic,
|
10
12
|
List,
|
11
13
|
Optional,
|
12
14
|
cast,
|
@@ -14,11 +16,13 @@ from typing import (
|
|
14
16
|
|
15
17
|
from graphql import GraphQLError, GraphQLSyntaxError, parse
|
16
18
|
|
19
|
+
from strawberry.exceptions import ConnectionRejectionError
|
17
20
|
from strawberry.http.exceptions import (
|
18
21
|
NonJsonMessageReceived,
|
19
22
|
NonTextMessageReceived,
|
20
23
|
WebSocketDisconnected,
|
21
24
|
)
|
25
|
+
from strawberry.http.typevars import Context, RootValue
|
22
26
|
from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
|
23
27
|
CompleteMessage,
|
24
28
|
ConnectionInitMessage,
|
@@ -31,29 +35,32 @@ from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
|
|
31
35
|
from strawberry.types import ExecutionResult
|
32
36
|
from strawberry.types.execution import PreExecutionError
|
33
37
|
from strawberry.types.graphql import OperationType
|
38
|
+
from strawberry.types.unset import UnsetType
|
34
39
|
from strawberry.utils.debug import pretty_print_graphql_operation
|
35
40
|
from strawberry.utils.operation import get_operation_type
|
36
41
|
|
37
42
|
if TYPE_CHECKING:
|
38
43
|
from datetime import timedelta
|
39
44
|
|
40
|
-
from strawberry.http.async_base_view import AsyncWebSocketAdapter
|
45
|
+
from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncWebSocketAdapter
|
41
46
|
from strawberry.schema import BaseSchema
|
42
47
|
from strawberry.schema.subscribe import SubscriptionResult
|
43
48
|
|
44
49
|
|
45
|
-
class BaseGraphQLTransportWSHandler:
|
50
|
+
class BaseGraphQLTransportWSHandler(Generic[Context, RootValue]):
|
46
51
|
task_logger: logging.Logger = logging.getLogger("strawberry.ws.task")
|
47
52
|
|
48
53
|
def __init__(
|
49
54
|
self,
|
55
|
+
view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
|
50
56
|
websocket: AsyncWebSocketAdapter,
|
51
|
-
context:
|
52
|
-
root_value:
|
57
|
+
context: Context,
|
58
|
+
root_value: RootValue,
|
53
59
|
schema: BaseSchema,
|
54
60
|
debug: bool,
|
55
61
|
connection_init_wait_timeout: timedelta,
|
56
62
|
) -> None:
|
63
|
+
self.view = view
|
57
64
|
self.websocket = websocket
|
58
65
|
self.context = context
|
59
66
|
self.root_value = root_value
|
@@ -64,9 +71,8 @@ class BaseGraphQLTransportWSHandler:
|
|
64
71
|
self.connection_init_received = False
|
65
72
|
self.connection_acknowledged = False
|
66
73
|
self.connection_timed_out = False
|
67
|
-
self.operations: Dict[str, Operation] = {}
|
74
|
+
self.operations: Dict[str, Operation[Context, RootValue]] = {}
|
68
75
|
self.completed_tasks: List[asyncio.Task] = []
|
69
|
-
self.connection_params: Optional[Dict[str, object]] = None
|
70
76
|
|
71
77
|
async def handle(self) -> None:
|
72
78
|
self.on_request_accepted()
|
@@ -169,15 +175,33 @@ class BaseGraphQLTransportWSHandler:
|
|
169
175
|
)
|
170
176
|
return
|
171
177
|
|
172
|
-
self.connection_params = payload
|
173
|
-
|
174
178
|
if self.connection_init_received:
|
175
179
|
reason = "Too many initialisation requests"
|
176
180
|
await self.websocket.close(code=4429, reason=reason)
|
177
181
|
return
|
178
182
|
|
179
183
|
self.connection_init_received = True
|
180
|
-
|
184
|
+
|
185
|
+
if isinstance(self.context, dict):
|
186
|
+
self.context["connection_params"] = payload
|
187
|
+
elif hasattr(self.context, "connection_params"):
|
188
|
+
self.context.connection_params = payload
|
189
|
+
|
190
|
+
self.context = cast(Context, self.context)
|
191
|
+
|
192
|
+
try:
|
193
|
+
connection_ack_payload = await self.view.on_ws_connect(self.context)
|
194
|
+
except ConnectionRejectionError:
|
195
|
+
await self.websocket.close(code=4403, reason="Forbidden")
|
196
|
+
return
|
197
|
+
|
198
|
+
if isinstance(connection_ack_payload, UnsetType):
|
199
|
+
await self.send_message({"type": "connection_ack"})
|
200
|
+
else:
|
201
|
+
await self.send_message(
|
202
|
+
{"type": "connection_ack", "payload": connection_ack_payload}
|
203
|
+
)
|
204
|
+
|
181
205
|
self.connection_acknowledged = True
|
182
206
|
|
183
207
|
async def handle_ping(self, message: PingMessage) -> None:
|
@@ -219,11 +243,6 @@ class BaseGraphQLTransportWSHandler:
|
|
219
243
|
message["payload"].get("variables"),
|
220
244
|
)
|
221
245
|
|
222
|
-
if isinstance(self.context, dict):
|
223
|
-
self.context["connection_params"] = self.connection_params
|
224
|
-
elif hasattr(self.context, "connection_params"):
|
225
|
-
self.context.connection_params = self.connection_params
|
226
|
-
|
227
246
|
operation = Operation(
|
228
247
|
self,
|
229
248
|
message["id"],
|
@@ -236,7 +255,7 @@ class BaseGraphQLTransportWSHandler:
|
|
236
255
|
operation.task = asyncio.create_task(self.run_operation(operation))
|
237
256
|
self.operations[message["id"]] = operation
|
238
257
|
|
239
|
-
async def run_operation(self, operation: Operation) -> None:
|
258
|
+
async def run_operation(self, operation: Operation[Context, RootValue]) -> None:
|
240
259
|
"""The operation task's top level method. Cleans-up and de-registers the operation once it is done."""
|
241
260
|
# TODO: Handle errors in this method using self.handle_task_exception()
|
242
261
|
|
@@ -320,7 +339,7 @@ class BaseGraphQLTransportWSHandler:
|
|
320
339
|
await task
|
321
340
|
|
322
341
|
|
323
|
-
class Operation:
|
342
|
+
class Operation(Generic[Context, RootValue]):
|
324
343
|
"""A class encapsulating a single operation with its id. Helps enforce protocol state transition."""
|
325
344
|
|
326
345
|
__slots__ = [
|
@@ -336,7 +355,7 @@ class Operation:
|
|
336
355
|
|
337
356
|
def __init__(
|
338
357
|
self,
|
339
|
-
handler: BaseGraphQLTransportWSHandler,
|
358
|
+
handler: BaseGraphQLTransportWSHandler[Context, RootValue],
|
340
359
|
id: str,
|
341
360
|
operation_type: OperationType,
|
342
361
|
query: str,
|
@@ -4,13 +4,17 @@ import asyncio
|
|
4
4
|
from contextlib import suppress
|
5
5
|
from typing import (
|
6
6
|
TYPE_CHECKING,
|
7
|
+
Any,
|
7
8
|
AsyncGenerator,
|
8
9
|
Dict,
|
10
|
+
Generic,
|
9
11
|
Optional,
|
10
12
|
cast,
|
11
13
|
)
|
12
14
|
|
15
|
+
from strawberry.exceptions import ConnectionRejectionError
|
13
16
|
from strawberry.http.exceptions import NonTextMessageReceived, WebSocketDisconnected
|
17
|
+
from strawberry.http.typevars import Context, RootValue
|
14
18
|
from strawberry.subscriptions.protocols.graphql_ws.types import (
|
15
19
|
ConnectionInitMessage,
|
16
20
|
ConnectionTerminateMessage,
|
@@ -20,24 +24,30 @@ from strawberry.subscriptions.protocols.graphql_ws.types import (
|
|
20
24
|
StopMessage,
|
21
25
|
)
|
22
26
|
from strawberry.types.execution import ExecutionResult, PreExecutionError
|
27
|
+
from strawberry.types.unset import UnsetType
|
23
28
|
from strawberry.utils.debug import pretty_print_graphql_operation
|
24
29
|
|
25
30
|
if TYPE_CHECKING:
|
26
|
-
from strawberry.http.async_base_view import AsyncWebSocketAdapter
|
31
|
+
from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncWebSocketAdapter
|
27
32
|
from strawberry.schema import BaseSchema
|
28
33
|
|
29
34
|
|
30
|
-
class BaseGraphQLWSHandler:
|
35
|
+
class BaseGraphQLWSHandler(Generic[Context, RootValue]):
|
36
|
+
context: Context
|
37
|
+
root_value: RootValue
|
38
|
+
|
31
39
|
def __init__(
|
32
40
|
self,
|
41
|
+
view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
|
33
42
|
websocket: AsyncWebSocketAdapter,
|
34
|
-
context:
|
35
|
-
root_value:
|
43
|
+
context: Context,
|
44
|
+
root_value: RootValue,
|
36
45
|
schema: BaseSchema,
|
37
46
|
debug: bool,
|
38
47
|
keep_alive: bool,
|
39
48
|
keep_alive_interval: Optional[float],
|
40
49
|
) -> None:
|
50
|
+
self.view = view
|
41
51
|
self.websocket = websocket
|
42
52
|
self.context = context
|
43
53
|
self.root_value = root_value
|
@@ -48,7 +58,6 @@ class BaseGraphQLWSHandler:
|
|
48
58
|
self.keep_alive_task: Optional[asyncio.Task] = None
|
49
59
|
self.subscriptions: Dict[str, AsyncGenerator] = {}
|
50
60
|
self.tasks: Dict[str, asyncio.Task] = {}
|
51
|
-
self.connection_params: Optional[Dict[str, object]] = None
|
52
61
|
|
53
62
|
async def handle(self) -> None:
|
54
63
|
try:
|
@@ -92,9 +101,29 @@ class BaseGraphQLWSHandler:
|
|
92
101
|
await self.websocket.close(code=1000, reason="")
|
93
102
|
return
|
94
103
|
|
95
|
-
self.
|
104
|
+
if isinstance(self.context, dict):
|
105
|
+
self.context["connection_params"] = payload
|
106
|
+
elif hasattr(self.context, "connection_params"):
|
107
|
+
self.context.connection_params = payload
|
108
|
+
|
109
|
+
self.context = cast(Context, self.context)
|
96
110
|
|
97
|
-
|
111
|
+
try:
|
112
|
+
connection_ack_payload = await self.view.on_ws_connect(self.context)
|
113
|
+
except ConnectionRejectionError as e:
|
114
|
+
await self.send_message({"type": "connection_error", "payload": e.payload})
|
115
|
+
await self.websocket.close(code=1011, reason="")
|
116
|
+
return
|
117
|
+
|
118
|
+
if (
|
119
|
+
isinstance(connection_ack_payload, UnsetType)
|
120
|
+
or connection_ack_payload is None
|
121
|
+
):
|
122
|
+
await self.send_message({"type": "connection_ack"})
|
123
|
+
else:
|
124
|
+
await self.send_message(
|
125
|
+
{"type": "connection_ack", "payload": connection_ack_payload}
|
126
|
+
)
|
98
127
|
|
99
128
|
if self.keep_alive:
|
100
129
|
keep_alive_handler = self.handle_keep_alive()
|
@@ -112,11 +141,6 @@ class BaseGraphQLWSHandler:
|
|
112
141
|
operation_name = payload.get("operationName")
|
113
142
|
variables = payload.get("variables")
|
114
143
|
|
115
|
-
if isinstance(self.context, dict):
|
116
|
-
self.context["connection_params"] = self.connection_params
|
117
|
-
elif hasattr(self.context, "connection_params"):
|
118
|
-
self.context.connection_params = self.connection_params
|
119
|
-
|
120
144
|
if self.debug:
|
121
145
|
pretty_print_graphql_operation(operation_name, query, variables)
|
122
146
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/aiohttp/test/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/base.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/channels/handlers/ws_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/codegen.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/export_schema.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/commands/schema_codegen.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/cli/utils/load_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/__init__.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/python.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/plugins/typescript.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codegen/query_codegen.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codemods/annotated_unions.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/codemods/update_imports.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/django/test/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/exception.py
RENAMED
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/exception_source.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/exceptions/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.253.1 → strawberry_graphql-0.254.1}/strawberry/experimental/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|