strawberry-graphql 0.268.0__tar.gz → 0.269.0.dev1746905409__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.268.0 → strawberry_graphql-0.269.0.dev1746905409}/PKG-INFO +1 -1
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/pyproject.toml +1 -1
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/__init__.py +2 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/annotation.py +7 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/__init__.py +14 -9
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/async_base_view.py +81 -5
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/printer/printer.py +10 -2
- strawberry_graphql-0.269.0.dev1746905409/strawberry/schema/_graphql_core.py +46 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/config.py +1 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/schema.py +47 -7
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/static/graphiql.html +5 -5
- strawberry_graphql-0.269.0.dev1746905409/strawberry/streamable.py +36 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/LICENSE +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/README.md +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codemods/update_imports.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/arguments.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/auto.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/base.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/cast.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/field.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/maybe.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/union.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/types/unset.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/utils/typing.py +0 -0
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/__init__.py
RENAMED
@@ -11,6 +11,7 @@ from .permission import BasePermission
|
|
11
11
|
from .scalars import ID
|
12
12
|
from .schema import Schema
|
13
13
|
from .schema_directive import schema_directive
|
14
|
+
from .streamable import Streamable
|
14
15
|
from .types.arguments import argument
|
15
16
|
from .types.auto import auto
|
16
17
|
from .types.cast import cast
|
@@ -37,6 +38,7 @@ __all__ = [
|
|
37
38
|
"Private",
|
38
39
|
"Schema",
|
39
40
|
"Some",
|
41
|
+
"Streamable",
|
40
42
|
"argument",
|
41
43
|
"asdict",
|
42
44
|
"auto",
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/annotation.py
RENAMED
@@ -17,6 +17,7 @@ from typing import (
|
|
17
17
|
)
|
18
18
|
from typing_extensions import Self, get_args, get_origin
|
19
19
|
|
20
|
+
from strawberry.streamable import StrawberryStreamable
|
20
21
|
from strawberry.types.base import (
|
21
22
|
StrawberryList,
|
22
23
|
StrawberryMaybe,
|
@@ -143,6 +144,8 @@ class StrawberryAnnotation:
|
|
143
144
|
|
144
145
|
if self._is_lazy_type(evaled_type):
|
145
146
|
return evaled_type
|
147
|
+
if self._is_streamable(evaled_type, args):
|
148
|
+
return self.create_list(list[evaled_type])
|
146
149
|
if self._is_list(evaled_type):
|
147
150
|
return self.create_list(evaled_type)
|
148
151
|
if type_of := self._get_maybe_type(evaled_type):
|
@@ -323,6 +326,10 @@ class StrawberryAnnotation:
|
|
323
326
|
def _get_maybe_type(cls, annotation: Any) -> type | None:
|
324
327
|
return get_args(annotation)[0] if _annotation_is_maybe(annotation) else None
|
325
328
|
|
329
|
+
@classmethod
|
330
|
+
def _is_streamable(cls, annotation: Any, args: list[Any]) -> bool:
|
331
|
+
return any(isinstance(arg, StrawberryStreamable) for arg in args)
|
332
|
+
|
326
333
|
@classmethod
|
327
334
|
def _is_strawberry_type(cls, evaled_type: Any) -> bool:
|
328
335
|
# Prevent import cycles
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/http/__init__.py
RENAMED
@@ -1,11 +1,13 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
from dataclasses import dataclass
|
4
|
-
from typing import
|
4
|
+
from typing import Any, Optional
|
5
5
|
from typing_extensions import Literal, TypedDict
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
from strawberry.schema._graphql_core import (
|
8
|
+
GraphQLIncrementalExecutionResults,
|
9
|
+
ResultType,
|
10
|
+
)
|
9
11
|
|
10
12
|
|
11
13
|
class GraphQLHTTPResponse(TypedDict, total=False):
|
@@ -14,13 +16,16 @@ class GraphQLHTTPResponse(TypedDict, total=False):
|
|
14
16
|
extensions: Optional[dict[str, object]]
|
15
17
|
|
16
18
|
|
17
|
-
def process_result(result:
|
18
|
-
|
19
|
+
def process_result(result: ResultType) -> GraphQLHTTPResponse:
|
20
|
+
if isinstance(result, GraphQLIncrementalExecutionResults):
|
21
|
+
return result
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
23
|
+
errors, extensions = result.errors, result.extensions
|
24
|
+
data: GraphQLHTTPResponse = {
|
25
|
+
"data": result.data,
|
26
|
+
**({"errors": [err.formatted for err in errors]} if errors else {}),
|
27
|
+
**({"extensions": extensions} if extensions else {}),
|
28
|
+
}
|
24
29
|
|
25
30
|
return data
|
26
31
|
|
@@ -25,6 +25,9 @@ from strawberry.http import (
|
|
25
25
|
process_result,
|
26
26
|
)
|
27
27
|
from strawberry.http.ides import GraphQL_IDE
|
28
|
+
from strawberry.schema._graphql_core import (
|
29
|
+
GraphQLIncrementalExecutionResults,
|
30
|
+
)
|
28
31
|
from strawberry.schema.base import BaseSchema
|
29
32
|
from strawberry.schema.exceptions import InvalidOperationTypeError
|
30
33
|
from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL, GRAPHQL_WS_PROTOCOL
|
@@ -258,7 +261,7 @@ class AsyncBaseHTTPView(
|
|
258
261
|
root_value: Optional[RootValue] = UNSET,
|
259
262
|
) -> WebSocketResponse: ...
|
260
263
|
|
261
|
-
async def run(
|
264
|
+
async def run( # noqa: PLR0915
|
262
265
|
self,
|
263
266
|
request: Union[Request, WebSocketRequest],
|
264
267
|
context: Optional[Context] = UNSET,
|
@@ -349,6 +352,75 @@ class AsyncBaseHTTPView(
|
|
349
352
|
"Content-Type": "multipart/mixed;boundary=graphql;subscriptionSpec=1.0,application/json",
|
350
353
|
},
|
351
354
|
)
|
355
|
+
if isinstance(result, GraphQLIncrementalExecutionResults):
|
356
|
+
|
357
|
+
async def stream() -> AsyncGenerator[str, None]:
|
358
|
+
yield "---"
|
359
|
+
|
360
|
+
response = await self.process_result(request, result.initial_result)
|
361
|
+
|
362
|
+
response["hasNext"] = result.initial_result.has_next
|
363
|
+
response["pending"] = [
|
364
|
+
p.formatted for p in result.initial_result.pending
|
365
|
+
]
|
366
|
+
response["extensions"] = result.initial_result.extensions
|
367
|
+
|
368
|
+
yield self.encode_multipart_data(response, "-")
|
369
|
+
|
370
|
+
all_pending = result.initial_result.pending
|
371
|
+
|
372
|
+
async for value in result.subsequent_results:
|
373
|
+
response = {
|
374
|
+
"hasNext": value.has_next,
|
375
|
+
"extensions": value.extensions,
|
376
|
+
}
|
377
|
+
|
378
|
+
if value.pending:
|
379
|
+
response["pending"] = [p.formatted for p in value.pending]
|
380
|
+
|
381
|
+
if value.completed:
|
382
|
+
response["completed"] = [p.formatted for p in value.completed]
|
383
|
+
|
384
|
+
if value.incremental:
|
385
|
+
incremental = []
|
386
|
+
|
387
|
+
all_pending.extend(value.pending)
|
388
|
+
|
389
|
+
for incremental_value in value.incremental:
|
390
|
+
pending_value = next(
|
391
|
+
(
|
392
|
+
v
|
393
|
+
for v in all_pending
|
394
|
+
if v.id == incremental_value.id
|
395
|
+
),
|
396
|
+
None,
|
397
|
+
)
|
398
|
+
|
399
|
+
assert pending_value
|
400
|
+
|
401
|
+
incremental.append(
|
402
|
+
{
|
403
|
+
**incremental_value.formatted,
|
404
|
+
"path": pending_value.path,
|
405
|
+
"label": pending_value.label,
|
406
|
+
}
|
407
|
+
)
|
408
|
+
|
409
|
+
response["incremental"] = incremental
|
410
|
+
|
411
|
+
yield self.encode_multipart_data(response, "-")
|
412
|
+
|
413
|
+
yield "--\r\n"
|
414
|
+
|
415
|
+
return await self.create_streaming_response(
|
416
|
+
request,
|
417
|
+
stream,
|
418
|
+
sub_response,
|
419
|
+
headers={
|
420
|
+
"Transfer-Encoding": "chunked",
|
421
|
+
"Content-Type": 'multipart/mixed; boundary="-"',
|
422
|
+
},
|
423
|
+
)
|
352
424
|
|
353
425
|
response_data = await self.process_result(request=request, result=result)
|
354
426
|
|
@@ -360,12 +432,16 @@ class AsyncBaseHTTPView(
|
|
360
432
|
)
|
361
433
|
|
362
434
|
def encode_multipart_data(self, data: Any, separator: str) -> str:
|
435
|
+
encoded_data = self.encode_json(data)
|
436
|
+
|
363
437
|
return "".join(
|
364
438
|
[
|
365
|
-
|
366
|
-
"Content-Type: application/json\r\n
|
367
|
-
|
368
|
-
"\n",
|
439
|
+
"\r\n",
|
440
|
+
"Content-Type: application/json; charset=utf-8\r\n",
|
441
|
+
"Content-Length: " + str(len(encoded_data)) + "\r\n",
|
442
|
+
"\r\n",
|
443
|
+
encoded_data,
|
444
|
+
f"\r\n--{separator}",
|
369
445
|
]
|
370
446
|
)
|
371
447
|
|
@@ -561,9 +561,9 @@ def print_schema_definition(
|
|
561
561
|
def print_directive(
|
562
562
|
directive: GraphQLDirective, *, schema: BaseSchema
|
563
563
|
) -> Optional[str]:
|
564
|
-
strawberry_directive = directive.extensions
|
564
|
+
strawberry_directive = directive.extensions.get("strawberry-definition")
|
565
565
|
|
566
|
-
if (
|
566
|
+
if strawberry_directive is None or (
|
567
567
|
isinstance(strawberry_directive, StrawberrySchemaDirective)
|
568
568
|
and not strawberry_directive.print_definition
|
569
569
|
):
|
@@ -621,6 +621,14 @@ def print_schema(schema: BaseSchema) -> str:
|
|
621
621
|
if (printed_directive := print_directive(directive, schema=schema)) is not None
|
622
622
|
]
|
623
623
|
|
624
|
+
if schema.config.enable_experimental_incremental_execution:
|
625
|
+
directives.append(
|
626
|
+
"directive @defer(if: Boolean, label: String) on FRAGMENT_SPREAD | INLINE_FRAGMENT"
|
627
|
+
)
|
628
|
+
directives.append(
|
629
|
+
"directive @stream(if: Boolean, label: String, initialCount: Int = 0) on FIELD"
|
630
|
+
)
|
631
|
+
|
624
632
|
def _name_getter(type_: Any) -> str:
|
625
633
|
if hasattr(type_, "name"):
|
626
634
|
return type_.name
|
@@ -0,0 +1,46 @@
|
|
1
|
+
from typing import Union
|
2
|
+
|
3
|
+
from graphql.execution import ExecutionContext as GraphQLExecutionContext
|
4
|
+
from graphql.execution import ExecutionResult as GraphQLExecutionResult
|
5
|
+
from graphql.execution import execute, subscribe
|
6
|
+
|
7
|
+
from strawberry.types import ExecutionResult
|
8
|
+
|
9
|
+
try:
|
10
|
+
from graphql import (
|
11
|
+
ExperimentalIncrementalExecutionResults as GraphQLIncrementalExecutionResults,
|
12
|
+
)
|
13
|
+
from graphql.execution import experimental_execute_incrementally
|
14
|
+
from graphql.type.directives import (
|
15
|
+
GraphQLDeferDirective,
|
16
|
+
GraphQLStreamDirective,
|
17
|
+
)
|
18
|
+
|
19
|
+
incremental_execution_directives = (
|
20
|
+
GraphQLDeferDirective,
|
21
|
+
GraphQLStreamDirective,
|
22
|
+
)
|
23
|
+
|
24
|
+
except ImportError:
|
25
|
+
GraphQLIncrementalExecutionResults = type(None)
|
26
|
+
|
27
|
+
incremental_execution_directives = []
|
28
|
+
experimental_execute_incrementally = None
|
29
|
+
|
30
|
+
|
31
|
+
# TODO: give this a better name, maybe also a better place
|
32
|
+
ResultType = Union[
|
33
|
+
GraphQLExecutionResult,
|
34
|
+
GraphQLIncrementalExecutionResults,
|
35
|
+
ExecutionResult,
|
36
|
+
]
|
37
|
+
|
38
|
+
__all__ = [
|
39
|
+
"GraphQLExecutionContext",
|
40
|
+
"GraphQLIncrementalExecutionResults",
|
41
|
+
"ResultType",
|
42
|
+
"execute",
|
43
|
+
"experimental_execute_incrementally",
|
44
|
+
"incremental_execution_directives",
|
45
|
+
"subscribe",
|
46
|
+
]
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/schema/schema.py
RENAMED
@@ -29,8 +29,6 @@ from graphql import (
|
|
29
29
|
parse,
|
30
30
|
validate_schema,
|
31
31
|
)
|
32
|
-
from graphql.execution import ExecutionContext as GraphQLExecutionContext
|
33
|
-
from graphql.execution import execute, subscribe
|
34
32
|
from graphql.execution.middleware import MiddlewareManager
|
35
33
|
from graphql.type.directives import specified_directives
|
36
34
|
from graphql.validation import validate
|
@@ -63,6 +61,15 @@ from strawberry.utils.aio import aclosing
|
|
63
61
|
from strawberry.utils.await_maybe import await_maybe
|
64
62
|
|
65
63
|
from . import compat
|
64
|
+
from ._graphql_core import (
|
65
|
+
GraphQLExecutionContext,
|
66
|
+
GraphQLIncrementalExecutionResults,
|
67
|
+
ResultType,
|
68
|
+
execute,
|
69
|
+
experimental_execute_incrementally,
|
70
|
+
incremental_execution_directives,
|
71
|
+
subscribe,
|
72
|
+
)
|
66
73
|
from .base import BaseSchema
|
67
74
|
from .config import StrawberryConfig
|
68
75
|
from .exceptions import InvalidOperationTypeError
|
@@ -91,6 +98,7 @@ OriginSubscriptionResult = Union[
|
|
91
98
|
AsyncIterator[OriginalExecutionResult],
|
92
99
|
]
|
93
100
|
|
101
|
+
|
94
102
|
DEFAULT_ALLOWED_OPERATION_TYPES = {
|
95
103
|
OperationType.QUERY,
|
96
104
|
OperationType.MUTATION,
|
@@ -255,11 +263,16 @@ class Schema(BaseSchema):
|
|
255
263
|
graphql_types.append(graphql_type)
|
256
264
|
|
257
265
|
try:
|
266
|
+
directives = specified_directives + tuple(graphql_directives)
|
267
|
+
|
268
|
+
if self.config.enable_experimental_incremental_execution:
|
269
|
+
directives = tuple(directives) + tuple(incremental_execution_directives)
|
270
|
+
|
258
271
|
self._schema = GraphQLSchema(
|
259
272
|
query=query_type,
|
260
273
|
mutation=mutation_type,
|
261
274
|
subscription=subscription_type if subscription else None,
|
262
|
-
directives=
|
275
|
+
directives=directives,
|
263
276
|
types=graphql_types,
|
264
277
|
extensions={
|
265
278
|
GraphQLCoreConverter.DEFINITION_BACKREF: self,
|
@@ -437,12 +450,16 @@ class Schema(BaseSchema):
|
|
437
450
|
async def _handle_execution_result(
|
438
451
|
self,
|
439
452
|
context: ExecutionContext,
|
440
|
-
result:
|
453
|
+
result: ResultType,
|
441
454
|
extensions_runner: SchemaExtensionsRunner,
|
442
455
|
*,
|
443
456
|
# TODO: can we remove this somehow, see comment in execute
|
444
457
|
skip_process_errors: bool = False,
|
445
458
|
) -> ExecutionResult:
|
459
|
+
# TODO: handle this, also, why do we have both GraphQLExecutionResult and ExecutionResult?
|
460
|
+
if isinstance(result, GraphQLIncrementalExecutionResults):
|
461
|
+
return result
|
462
|
+
|
446
463
|
# Set errors on the context so that it's easier
|
447
464
|
# to access in extensions
|
448
465
|
if result.errors:
|
@@ -483,6 +500,17 @@ class Schema(BaseSchema):
|
|
483
500
|
extensions_runner = self.create_extensions_runner(execution_context, extensions)
|
484
501
|
middleware_manager = self._get_middleware_manager(extensions)
|
485
502
|
|
503
|
+
execute_function = execute
|
504
|
+
|
505
|
+
if self.config.enable_experimental_incremental_execution:
|
506
|
+
execute_function = experimental_execute_incrementally
|
507
|
+
|
508
|
+
if execute_function is None:
|
509
|
+
raise RuntimeError(
|
510
|
+
"Incremental execution is enabled but experimental_execute_incrementally is not available, "
|
511
|
+
"please install graphql-core>=3.3.0"
|
512
|
+
)
|
513
|
+
|
486
514
|
try:
|
487
515
|
async with extensions_runner.operation():
|
488
516
|
# Note: In graphql-core the schema would be validated here but in
|
@@ -501,7 +529,7 @@ class Schema(BaseSchema):
|
|
501
529
|
async with extensions_runner.executing():
|
502
530
|
if not execution_context.result:
|
503
531
|
result = await await_maybe(
|
504
|
-
|
532
|
+
execute_function(
|
505
533
|
self._schema,
|
506
534
|
execution_context.graphql_document,
|
507
535
|
root_value=execution_context.root_value,
|
@@ -517,7 +545,9 @@ class Schema(BaseSchema):
|
|
517
545
|
result = execution_context.result
|
518
546
|
# Also set errors on the execution_context so that it's easier
|
519
547
|
# to access in extensions
|
520
|
-
|
548
|
+
|
549
|
+
# TODO: maybe here use the first result from incremental execution if it exists
|
550
|
+
if isinstance(result, GraphQLExecutionResult) and result.errors:
|
521
551
|
execution_context.errors = result.errors
|
522
552
|
|
523
553
|
# Run the `Schema.process_errors` function here before
|
@@ -567,6 +597,16 @@ class Schema(BaseSchema):
|
|
567
597
|
extensions_runner = self.create_extensions_runner(execution_context, extensions)
|
568
598
|
middleware_manager = self._get_middleware_manager(extensions)
|
569
599
|
|
600
|
+
execute_function = execute
|
601
|
+
|
602
|
+
if self.config.enable_experimental_incremental_execution:
|
603
|
+
execute_function = experimental_execute_incrementally
|
604
|
+
|
605
|
+
if execute_function is None:
|
606
|
+
raise RuntimeError(
|
607
|
+
"Incremental execution is enabled but experimental_execute_incrementally is not available, "
|
608
|
+
"please install graphql-core>=3.3.0"
|
609
|
+
)
|
570
610
|
try:
|
571
611
|
with extensions_runner.operation():
|
572
612
|
# Note: In graphql-core the schema would be validated here but in
|
@@ -608,7 +648,7 @@ class Schema(BaseSchema):
|
|
608
648
|
|
609
649
|
with extensions_runner.executing():
|
610
650
|
if not execution_context.result:
|
611
|
-
result =
|
651
|
+
result = execute_function(
|
612
652
|
self._schema,
|
613
653
|
execution_context.graphql_document,
|
614
654
|
root_value=execution_context.root_value,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<!
|
1
|
+
<!doctype html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
4
|
<title>Strawberry GraphiQL</title>
|
@@ -61,8 +61,8 @@
|
|
61
61
|
<link
|
62
62
|
crossorigin
|
63
63
|
rel="stylesheet"
|
64
|
-
href="https://unpkg.com/graphiql@3.
|
65
|
-
integrity="sha384-
|
64
|
+
href="https://unpkg.com/graphiql@3.8.3/graphiql.min.css"
|
65
|
+
integrity="sha384-Mq3vbRBY71jfjQAt/DcjxUIYY33ksal4cgdRt9U/hNPvHBCaT2JfJ/PTRiPKf0aM"
|
66
66
|
/>
|
67
67
|
|
68
68
|
<link
|
@@ -77,8 +77,8 @@
|
|
77
77
|
<div id="graphiql" class="graphiql-container">Loading...</div>
|
78
78
|
<script
|
79
79
|
crossorigin
|
80
|
-
src="https://unpkg.com/graphiql@3.
|
81
|
-
integrity="sha384-
|
80
|
+
src="https://unpkg.com/graphiql@3.8.3/graphiql.min.js"
|
81
|
+
integrity="sha384-HbRVEFG0JGJZeAHCJ9Xm2+tpknBQ7QZmNlO/DgZtkZ0aJSypT96YYGRNod99l9Ie"
|
82
82
|
></script>
|
83
83
|
<script
|
84
84
|
crossorigin
|
@@ -0,0 +1,36 @@
|
|
1
|
+
from collections.abc import AsyncGenerator
|
2
|
+
from typing import Annotated, TypeVar
|
3
|
+
|
4
|
+
|
5
|
+
class StrawberryStreamable: ...
|
6
|
+
|
7
|
+
|
8
|
+
T = TypeVar("T")
|
9
|
+
|
10
|
+
Streamable = Annotated[AsyncGenerator[T, None], StrawberryStreamable()]
|
11
|
+
"""Represents a list that can be streamed using @stream.
|
12
|
+
|
13
|
+
Example:
|
14
|
+
|
15
|
+
```python
|
16
|
+
import strawberry
|
17
|
+
from dataclasses import dataclass
|
18
|
+
|
19
|
+
|
20
|
+
@strawberry.type
|
21
|
+
class Comment:
|
22
|
+
id: strawberry.ID
|
23
|
+
content: str
|
24
|
+
|
25
|
+
|
26
|
+
@strawberry.type
|
27
|
+
class Article:
|
28
|
+
@strawberry.field
|
29
|
+
@staticmethod
|
30
|
+
async def comments() -> strawberry.Streamable[Comment]:
|
31
|
+
for comment in fetch_comments():
|
32
|
+
yield comment
|
33
|
+
```
|
34
|
+
"""
|
35
|
+
|
36
|
+
__all__ = ["Streamable"]
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/__main__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/aiohttp/views.py
RENAMED
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/asgi/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/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.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/cli/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/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.268.0 → strawberry_graphql-0.269.0.dev1746905409}/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.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/codegen/types.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/dataloader.py
RENAMED
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/directive.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/apps.py
RENAMED
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/strawberry/django/context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.268.0 → strawberry_graphql-0.269.0.dev1746905409}/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
|