strawberry-graphql 0.269.0.dev1747164009__tar.gz → 0.270.0__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.269.0.dev1747164009 → strawberry_graphql-0.270.0}/PKG-INFO +1 -1
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/pyproject.toml +1 -1
- strawberry_graphql-0.270.0/strawberry/quart/views.py +216 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/schema_converter.py +9 -23
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/arguments.py +5 -0
- strawberry_graphql-0.269.0.dev1747164009/strawberry/quart/views.py +0 -137
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/LICENSE +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/README.md +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codemods/update_imports.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/async_base_view.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/schema.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/auto.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/base.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/cast.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/field.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/maybe.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/union.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/types/unset.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/utils/typing.py +0 -0
@@ -0,0 +1,216 @@
|
|
1
|
+
import asyncio
|
2
|
+
import warnings
|
3
|
+
from collections.abc import AsyncGenerator, Mapping, Sequence
|
4
|
+
from datetime import timedelta
|
5
|
+
from json.decoder import JSONDecodeError
|
6
|
+
from typing import TYPE_CHECKING, Callable, ClassVar, Optional, Union, cast
|
7
|
+
from typing_extensions import TypeGuard
|
8
|
+
|
9
|
+
from quart import Request, Response, Websocket, request, websocket
|
10
|
+
from quart.ctx import has_websocket_context
|
11
|
+
from quart.views import View
|
12
|
+
from strawberry.http.async_base_view import (
|
13
|
+
AsyncBaseHTTPView,
|
14
|
+
AsyncHTTPRequestAdapter,
|
15
|
+
AsyncWebSocketAdapter,
|
16
|
+
)
|
17
|
+
from strawberry.http.exceptions import (
|
18
|
+
HTTPException,
|
19
|
+
NonJsonMessageReceived,
|
20
|
+
NonTextMessageReceived,
|
21
|
+
WebSocketDisconnected,
|
22
|
+
)
|
23
|
+
from strawberry.http.ides import GraphQL_IDE
|
24
|
+
from strawberry.http.types import FormData, HTTPMethod, QueryParams
|
25
|
+
from strawberry.http.typevars import Context, RootValue
|
26
|
+
from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL, GRAPHQL_WS_PROTOCOL
|
27
|
+
|
28
|
+
if TYPE_CHECKING:
|
29
|
+
from quart.typing import ResponseReturnValue
|
30
|
+
from strawberry.http import GraphQLHTTPResponse
|
31
|
+
from strawberry.schema.base import BaseSchema
|
32
|
+
|
33
|
+
|
34
|
+
class QuartHTTPRequestAdapter(AsyncHTTPRequestAdapter):
|
35
|
+
def __init__(self, request: Request) -> None:
|
36
|
+
self.request = request
|
37
|
+
|
38
|
+
@property
|
39
|
+
def query_params(self) -> QueryParams:
|
40
|
+
return self.request.args.to_dict()
|
41
|
+
|
42
|
+
@property
|
43
|
+
def method(self) -> HTTPMethod:
|
44
|
+
return cast("HTTPMethod", self.request.method.upper())
|
45
|
+
|
46
|
+
@property
|
47
|
+
def content_type(self) -> Optional[str]:
|
48
|
+
return self.request.content_type
|
49
|
+
|
50
|
+
@property
|
51
|
+
def headers(self) -> Mapping[str, str]:
|
52
|
+
return self.request.headers # type: ignore
|
53
|
+
|
54
|
+
async def get_body(self) -> str:
|
55
|
+
return (await self.request.data).decode()
|
56
|
+
|
57
|
+
async def get_form_data(self) -> FormData:
|
58
|
+
files = await self.request.files
|
59
|
+
form = await self.request.form
|
60
|
+
return FormData(files=files, form=form)
|
61
|
+
|
62
|
+
|
63
|
+
class QuartWebSocketAdapter(AsyncWebSocketAdapter):
|
64
|
+
def __init__(
|
65
|
+
self, view: AsyncBaseHTTPView, request: Websocket, response: Response
|
66
|
+
) -> None:
|
67
|
+
super().__init__(view)
|
68
|
+
self.ws = request
|
69
|
+
|
70
|
+
async def iter_json(
|
71
|
+
self, *, ignore_parsing_errors: bool = False
|
72
|
+
) -> AsyncGenerator[object, None]:
|
73
|
+
try:
|
74
|
+
while True:
|
75
|
+
# Raises asyncio.CancelledError when the connection is closed.
|
76
|
+
# https://quart.palletsprojects.com/en/latest/how_to_guides/websockets.html#detecting-disconnection
|
77
|
+
message = await self.ws.receive()
|
78
|
+
|
79
|
+
if not isinstance(message, str):
|
80
|
+
raise NonTextMessageReceived
|
81
|
+
|
82
|
+
try:
|
83
|
+
yield self.view.decode_json(message)
|
84
|
+
except JSONDecodeError as e:
|
85
|
+
if not ignore_parsing_errors:
|
86
|
+
raise NonJsonMessageReceived from e
|
87
|
+
except asyncio.CancelledError:
|
88
|
+
pass
|
89
|
+
|
90
|
+
async def send_json(self, message: Mapping[str, object]) -> None:
|
91
|
+
try:
|
92
|
+
# Raises asyncio.CancelledError when the connection is closed.
|
93
|
+
# https://quart.palletsprojects.com/en/latest/how_to_guides/websockets.html#detecting-disconnection
|
94
|
+
await self.ws.send(self.view.encode_json(message))
|
95
|
+
except asyncio.CancelledError as exc:
|
96
|
+
raise WebSocketDisconnected from exc
|
97
|
+
|
98
|
+
async def close(self, code: int, reason: str) -> None:
|
99
|
+
await self.ws.close(code, reason=reason)
|
100
|
+
|
101
|
+
|
102
|
+
class GraphQLView(
|
103
|
+
AsyncBaseHTTPView[
|
104
|
+
Request, Response, Response, Websocket, Response, Context, RootValue
|
105
|
+
],
|
106
|
+
View,
|
107
|
+
):
|
108
|
+
methods: ClassVar[list[str]] = ["GET", "POST"]
|
109
|
+
allow_queries_via_get: bool = True
|
110
|
+
request_adapter_class = QuartHTTPRequestAdapter
|
111
|
+
websocket_adapter_class = QuartWebSocketAdapter
|
112
|
+
|
113
|
+
def __init__(
|
114
|
+
self,
|
115
|
+
schema: "BaseSchema",
|
116
|
+
graphiql: Optional[bool] = None,
|
117
|
+
graphql_ide: Optional[GraphQL_IDE] = "graphiql",
|
118
|
+
allow_queries_via_get: bool = True,
|
119
|
+
keep_alive: bool = True,
|
120
|
+
keep_alive_interval: float = 1,
|
121
|
+
debug: bool = False,
|
122
|
+
subscription_protocols: Sequence[str] = (
|
123
|
+
GRAPHQL_TRANSPORT_WS_PROTOCOL,
|
124
|
+
GRAPHQL_WS_PROTOCOL,
|
125
|
+
),
|
126
|
+
connection_init_wait_timeout: timedelta = timedelta(minutes=1),
|
127
|
+
multipart_uploads_enabled: bool = False,
|
128
|
+
) -> None:
|
129
|
+
self.schema = schema
|
130
|
+
self.allow_queries_via_get = allow_queries_via_get
|
131
|
+
self.keep_alive = keep_alive
|
132
|
+
self.keep_alive_interval = keep_alive_interval
|
133
|
+
self.debug = debug
|
134
|
+
self.subscription_protocols = subscription_protocols
|
135
|
+
self.connection_init_wait_timeout = connection_init_wait_timeout
|
136
|
+
self.multipart_uploads_enabled = multipart_uploads_enabled
|
137
|
+
|
138
|
+
if graphiql is not None:
|
139
|
+
warnings.warn(
|
140
|
+
"The `graphiql` argument is deprecated in favor of `graphql_ide`",
|
141
|
+
DeprecationWarning,
|
142
|
+
stacklevel=2,
|
143
|
+
)
|
144
|
+
self.graphql_ide = "graphiql" if graphiql else None
|
145
|
+
else:
|
146
|
+
self.graphql_ide = graphql_ide
|
147
|
+
|
148
|
+
async def render_graphql_ide(self, request: Request) -> Response:
|
149
|
+
return Response(self.graphql_ide_html)
|
150
|
+
|
151
|
+
def create_response(
|
152
|
+
self, response_data: "GraphQLHTTPResponse", sub_response: Response
|
153
|
+
) -> Response:
|
154
|
+
sub_response.set_data(self.encode_json(response_data))
|
155
|
+
|
156
|
+
return sub_response
|
157
|
+
|
158
|
+
async def get_context(
|
159
|
+
self, request: Union[Request, Websocket], response: Response
|
160
|
+
) -> Context:
|
161
|
+
return {"request": request, "response": response} # type: ignore
|
162
|
+
|
163
|
+
async def get_root_value(
|
164
|
+
self, request: Union[Request, Websocket]
|
165
|
+
) -> Optional[RootValue]:
|
166
|
+
return None
|
167
|
+
|
168
|
+
async def get_sub_response(self, request: Request) -> Response:
|
169
|
+
return Response(status=200, content_type="application/json")
|
170
|
+
|
171
|
+
async def dispatch_request(self, **kwargs: object) -> "ResponseReturnValue":
|
172
|
+
try:
|
173
|
+
return await self.run(
|
174
|
+
request=websocket if has_websocket_context() else request
|
175
|
+
)
|
176
|
+
except HTTPException as e:
|
177
|
+
return Response(
|
178
|
+
response=e.reason,
|
179
|
+
status=e.status_code,
|
180
|
+
)
|
181
|
+
|
182
|
+
async def create_streaming_response(
|
183
|
+
self,
|
184
|
+
request: Request,
|
185
|
+
stream: Callable[[], AsyncGenerator[str, None]],
|
186
|
+
sub_response: Response,
|
187
|
+
headers: dict[str, str],
|
188
|
+
) -> Response:
|
189
|
+
return (
|
190
|
+
stream(),
|
191
|
+
sub_response.status_code,
|
192
|
+
{ # type: ignore
|
193
|
+
**sub_response.headers,
|
194
|
+
**headers,
|
195
|
+
},
|
196
|
+
)
|
197
|
+
|
198
|
+
def is_websocket_request(
|
199
|
+
self, request: Union[Request, Websocket]
|
200
|
+
) -> TypeGuard[Websocket]:
|
201
|
+
return has_websocket_context()
|
202
|
+
|
203
|
+
async def pick_websocket_subprotocol(self, request: Websocket) -> Optional[str]:
|
204
|
+
protocols = request.requested_subprotocols
|
205
|
+
intersection = set(protocols) & set(self.subscription_protocols)
|
206
|
+
sorted_intersection = sorted(intersection, key=protocols.index)
|
207
|
+
return next(iter(sorted_intersection), None)
|
208
|
+
|
209
|
+
async def create_websocket_response(
|
210
|
+
self, request: Websocket, subprotocol: Optional[str]
|
211
|
+
) -> Response:
|
212
|
+
await request.accept(subprotocol=subprotocol)
|
213
|
+
return Response()
|
214
|
+
|
215
|
+
|
216
|
+
__all__ = ["GraphQLView"]
|
@@ -270,10 +270,7 @@ class GraphQLCoreConverter:
|
|
270
270
|
GlobalID,
|
271
271
|
name=global_id_name,
|
272
272
|
description=GraphQLID.description,
|
273
|
-
|
274
|
-
GraphQLID.parse_literal(v, vars)
|
275
|
-
),
|
276
|
-
parse_value=GlobalID.from_id,
|
273
|
+
parse_value=lambda v: v,
|
277
274
|
serialize=str,
|
278
275
|
specified_by_url=("https://relay.dev/graphql/objectidentification.htm"),
|
279
276
|
)
|
@@ -803,6 +800,13 @@ class GraphQLCoreConverter:
|
|
803
800
|
return _resolver
|
804
801
|
|
805
802
|
def from_scalar(self, scalar: type) -> GraphQLScalarType:
|
803
|
+
from strawberry.relay.types import GlobalID
|
804
|
+
|
805
|
+
if not self.config.relay_use_legacy_global_id and scalar is GlobalID:
|
806
|
+
from strawberry import ID
|
807
|
+
|
808
|
+
return self.from_scalar(ID)
|
809
|
+
|
806
810
|
scalar_definition: ScalarDefinition
|
807
811
|
|
808
812
|
if scalar in self.scalar_registry:
|
@@ -817,21 +821,13 @@ class GraphQLCoreConverter:
|
|
817
821
|
|
818
822
|
scalar_name = self.config.name_converter.from_type(scalar_definition)
|
819
823
|
|
820
|
-
from strawberry.relay import GlobalID
|
821
|
-
|
822
824
|
if scalar_name not in self.type_map:
|
823
|
-
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
824
|
-
GraphQLNamedType.reserved_types.pop("ID")
|
825
|
-
|
826
825
|
implementation = (
|
827
826
|
scalar_definition.implementation
|
828
827
|
if scalar_definition.implementation is not None
|
829
828
|
else _make_scalar_type(scalar_definition)
|
830
829
|
)
|
831
830
|
|
832
|
-
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
833
|
-
GraphQLNamedType.reserved_types["ID"] = implementation
|
834
|
-
|
835
831
|
self.type_map[scalar_name] = ConcreteType(
|
836
832
|
definition=scalar_definition, implementation=implementation
|
837
833
|
)
|
@@ -841,17 +837,7 @@ class GraphQLCoreConverter:
|
|
841
837
|
# TODO: the other definition might not be a scalar, we should
|
842
838
|
# handle this case better, since right now we assume it is a scalar
|
843
839
|
|
844
|
-
|
845
|
-
# TODO: we need to find a better way to handle this, might be
|
846
|
-
# worth reworking our scalar implementation.
|
847
|
-
if (
|
848
|
-
hasattr(other_definition, "origin")
|
849
|
-
and hasattr(scalar_definition, "origin")
|
850
|
-
and other_definition.origin == GlobalID
|
851
|
-
and scalar_definition.origin == GraphQLID
|
852
|
-
):
|
853
|
-
pass
|
854
|
-
elif other_definition != scalar_definition:
|
840
|
+
if other_definition != scalar_definition:
|
855
841
|
other_definition = cast("ScalarDefinition", other_definition)
|
856
842
|
|
857
843
|
raise ScalarAlreadyRegisteredError(scalar_definition, other_definition)
|
@@ -170,6 +170,11 @@ def convert_argument(
|
|
170
170
|
]
|
171
171
|
|
172
172
|
if is_scalar(type_, scalar_registry):
|
173
|
+
from strawberry.relay.types import GlobalID
|
174
|
+
|
175
|
+
if type_ is GlobalID:
|
176
|
+
return GlobalID.from_id(value) # type: ignore
|
177
|
+
|
173
178
|
return value
|
174
179
|
|
175
180
|
if isinstance(type_, EnumDefinition):
|
@@ -1,137 +0,0 @@
|
|
1
|
-
import warnings
|
2
|
-
from collections.abc import AsyncGenerator, Mapping
|
3
|
-
from typing import TYPE_CHECKING, Callable, ClassVar, Optional, cast
|
4
|
-
from typing_extensions import TypeGuard
|
5
|
-
|
6
|
-
from quart import Request, Response, request
|
7
|
-
from quart.views import View
|
8
|
-
from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncHTTPRequestAdapter
|
9
|
-
from strawberry.http.exceptions import HTTPException
|
10
|
-
from strawberry.http.ides import GraphQL_IDE
|
11
|
-
from strawberry.http.types import FormData, HTTPMethod, QueryParams
|
12
|
-
from strawberry.http.typevars import Context, RootValue
|
13
|
-
|
14
|
-
if TYPE_CHECKING:
|
15
|
-
from quart.typing import ResponseReturnValue
|
16
|
-
from strawberry.http import GraphQLHTTPResponse
|
17
|
-
from strawberry.schema.base import BaseSchema
|
18
|
-
|
19
|
-
|
20
|
-
class QuartHTTPRequestAdapter(AsyncHTTPRequestAdapter):
|
21
|
-
def __init__(self, request: Request) -> None:
|
22
|
-
self.request = request
|
23
|
-
|
24
|
-
@property
|
25
|
-
def query_params(self) -> QueryParams:
|
26
|
-
return self.request.args.to_dict()
|
27
|
-
|
28
|
-
@property
|
29
|
-
def method(self) -> HTTPMethod:
|
30
|
-
return cast("HTTPMethod", self.request.method.upper())
|
31
|
-
|
32
|
-
@property
|
33
|
-
def content_type(self) -> Optional[str]:
|
34
|
-
return self.request.content_type
|
35
|
-
|
36
|
-
@property
|
37
|
-
def headers(self) -> Mapping[str, str]:
|
38
|
-
return self.request.headers # type: ignore
|
39
|
-
|
40
|
-
async def get_body(self) -> str:
|
41
|
-
return (await self.request.data).decode()
|
42
|
-
|
43
|
-
async def get_form_data(self) -> FormData:
|
44
|
-
files = await self.request.files
|
45
|
-
form = await self.request.form
|
46
|
-
return FormData(files=files, form=form)
|
47
|
-
|
48
|
-
|
49
|
-
class GraphQLView(
|
50
|
-
AsyncBaseHTTPView[
|
51
|
-
Request, Response, Response, Request, Response, Context, RootValue
|
52
|
-
],
|
53
|
-
View,
|
54
|
-
):
|
55
|
-
methods: ClassVar[list[str]] = ["GET", "POST"]
|
56
|
-
allow_queries_via_get: bool = True
|
57
|
-
request_adapter_class = QuartHTTPRequestAdapter
|
58
|
-
|
59
|
-
def __init__(
|
60
|
-
self,
|
61
|
-
schema: "BaseSchema",
|
62
|
-
graphiql: Optional[bool] = None,
|
63
|
-
graphql_ide: Optional[GraphQL_IDE] = "graphiql",
|
64
|
-
allow_queries_via_get: bool = True,
|
65
|
-
multipart_uploads_enabled: bool = False,
|
66
|
-
) -> None:
|
67
|
-
self.schema = schema
|
68
|
-
self.allow_queries_via_get = allow_queries_via_get
|
69
|
-
self.multipart_uploads_enabled = multipart_uploads_enabled
|
70
|
-
|
71
|
-
if graphiql is not None:
|
72
|
-
warnings.warn(
|
73
|
-
"The `graphiql` argument is deprecated in favor of `graphql_ide`",
|
74
|
-
DeprecationWarning,
|
75
|
-
stacklevel=2,
|
76
|
-
)
|
77
|
-
self.graphql_ide = "graphiql" if graphiql else None
|
78
|
-
else:
|
79
|
-
self.graphql_ide = graphql_ide
|
80
|
-
|
81
|
-
async def render_graphql_ide(self, request: Request) -> Response:
|
82
|
-
return Response(self.graphql_ide_html)
|
83
|
-
|
84
|
-
def create_response(
|
85
|
-
self, response_data: "GraphQLHTTPResponse", sub_response: Response
|
86
|
-
) -> Response:
|
87
|
-
sub_response.set_data(self.encode_json(response_data))
|
88
|
-
|
89
|
-
return sub_response
|
90
|
-
|
91
|
-
async def get_context(self, request: Request, response: Response) -> Context:
|
92
|
-
return {"request": request, "response": response} # type: ignore
|
93
|
-
|
94
|
-
async def get_root_value(self, request: Request) -> Optional[RootValue]:
|
95
|
-
return None
|
96
|
-
|
97
|
-
async def get_sub_response(self, request: Request) -> Response:
|
98
|
-
return Response(status=200, content_type="application/json")
|
99
|
-
|
100
|
-
async def dispatch_request(self) -> "ResponseReturnValue": # type: ignore
|
101
|
-
try:
|
102
|
-
return await self.run(request=request)
|
103
|
-
except HTTPException as e:
|
104
|
-
return Response(
|
105
|
-
response=e.reason,
|
106
|
-
status=e.status_code,
|
107
|
-
)
|
108
|
-
|
109
|
-
async def create_streaming_response(
|
110
|
-
self,
|
111
|
-
request: Request,
|
112
|
-
stream: Callable[[], AsyncGenerator[str, None]],
|
113
|
-
sub_response: Response,
|
114
|
-
headers: dict[str, str],
|
115
|
-
) -> Response:
|
116
|
-
return (
|
117
|
-
stream(),
|
118
|
-
sub_response.status_code,
|
119
|
-
{ # type: ignore
|
120
|
-
**sub_response.headers,
|
121
|
-
**headers,
|
122
|
-
},
|
123
|
-
)
|
124
|
-
|
125
|
-
def is_websocket_request(self, request: Request) -> TypeGuard[Request]:
|
126
|
-
return False
|
127
|
-
|
128
|
-
async def pick_websocket_subprotocol(self, request: Request) -> Optional[str]:
|
129
|
-
raise NotImplementedError
|
130
|
-
|
131
|
-
async def create_websocket_response(
|
132
|
-
self, request: Request, subprotocol: Optional[str]
|
133
|
-
) -> Response:
|
134
|
-
raise NotImplementedError
|
135
|
-
|
136
|
-
|
137
|
-
__all__ = ["GraphQLView"]
|
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/__main__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/aiohttp/views.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/annotation.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/asgi/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/chalice/views.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.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/app.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
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/cli/constants.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
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/codegen/types.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/dataloader.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/directive.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/apps.py
RENAMED
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.269.0.dev1747164009 → strawberry_graphql-0.270.0}/strawberry/django/views.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
|
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
|