strawberry-graphql 0.276.0.dev1750672223__tar.gz → 0.276.0.dev1752831589__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.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/PKG-INFO +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/pyproject.toml +2 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/annotation.py +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/object_type.py +2 -2
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/directives.py +6 -2
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/mask_errors.py +23 -10
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/__init__.py +5 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/async_base_view.py +19 -7
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/sync_base_view.py +16 -4
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/relay/types.py +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/_graphql_core.py +11 -4
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/schema.py +13 -20
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/arguments.py +51 -6
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/execution.py +1 -1
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/LICENSE +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/README.md +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/locate_definition.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/codemods/update_imports.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/invalid_superclass_interface.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/dataclasses/README.md +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/disable_introspection.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/streamable.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/auto.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/base.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/cast.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/field.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/maybe.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/union.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/types/unset.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/locate_definition.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/strawberry/utils/typing.py +0 -0
{strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/pyproject.toml
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "strawberry-graphql"
|
3
|
-
version = "0.276.0.dev.
|
3
|
+
version = "0.276.0.dev.1752831589"
|
4
4
|
description = "A library for creating GraphQL APIs"
|
5
5
|
authors = [{ name = "Patrick Arminio", email = "patrick.arminio@gmail.com" }]
|
6
6
|
license = { text = "MIT" }
|
@@ -323,6 +323,7 @@ ignore = [
|
|
323
323
|
"Q002",
|
324
324
|
"Q003",
|
325
325
|
"W191",
|
326
|
+
"PLR0915",
|
326
327
|
]
|
327
328
|
|
328
329
|
[tool.ruff.lint.per-file-ignores]
|
@@ -145,7 +145,7 @@ class StrawberryAnnotation:
|
|
145
145
|
if self._is_lazy_type(evaled_type):
|
146
146
|
return evaled_type
|
147
147
|
if self._is_streamable(evaled_type, args):
|
148
|
-
return self.create_list(list[evaled_type])
|
148
|
+
return self.create_list(list[evaled_type]) # type: ignore[valid-type]
|
149
149
|
if self._is_list(evaled_type):
|
150
150
|
return self.create_list(evaled_type)
|
151
151
|
if self._is_maybe(evaled_type):
|
@@ -116,7 +116,7 @@ if TYPE_CHECKING:
|
|
116
116
|
)
|
117
117
|
|
118
118
|
|
119
|
-
def type(
|
119
|
+
def type(
|
120
120
|
model: builtins.type[PydanticModel],
|
121
121
|
*,
|
122
122
|
fields: Optional[list[str]] = None,
|
@@ -129,7 +129,7 @@ def type( # noqa: PLR0915
|
|
129
129
|
include_computed: bool = False,
|
130
130
|
use_pydantic_alias: bool = True,
|
131
131
|
) -> Callable[..., builtins.type[StrawberryTypeFromPydantic[PydanticModel]]]:
|
132
|
-
def wrap(cls: Any) -> builtins.type[StrawberryTypeFromPydantic[PydanticModel]]:
|
132
|
+
def wrap(cls: Any) -> builtins.type[StrawberryTypeFromPydantic[PydanticModel]]:
|
133
133
|
compat = PydanticCompat.from_model(model)
|
134
134
|
model_fields = compat.get_model_fields(model, include_computed=include_computed)
|
135
135
|
original_fields_set = set(fields) if fields else set()
|
@@ -29,7 +29,9 @@ class DirectivesExtension(SchemaExtension):
|
|
29
29
|
) -> AwaitableOrValue[Any]:
|
30
30
|
value = await await_maybe(_next(root, info, *args, **kwargs))
|
31
31
|
|
32
|
-
|
32
|
+
nodes = list(info.field_nodes)
|
33
|
+
|
34
|
+
for directive in nodes[0].directives:
|
33
35
|
if directive.name.value in SPECIFIED_DIRECTIVES:
|
34
36
|
continue
|
35
37
|
strawberry_directive, arguments = process_directive(directive, value, info)
|
@@ -49,7 +51,9 @@ class DirectivesExtensionSync(SchemaExtension):
|
|
49
51
|
) -> AwaitableOrValue[Any]:
|
50
52
|
value = _next(root, info, *args, **kwargs)
|
51
53
|
|
52
|
-
|
54
|
+
nodes = list(info.field_nodes)
|
55
|
+
|
56
|
+
for directive in nodes[0].directives:
|
53
57
|
if directive.name.value in SPECIFIED_DIRECTIVES:
|
54
58
|
continue
|
55
59
|
strawberry_directive, arguments = process_directive(directive, value, info)
|
@@ -1,7 +1,8 @@
|
|
1
1
|
from collections.abc import Iterator
|
2
|
-
from typing import Callable
|
2
|
+
from typing import Any, Callable
|
3
3
|
|
4
4
|
from graphql.error import GraphQLError
|
5
|
+
from graphql.execution import ExecutionResult
|
5
6
|
|
6
7
|
from strawberry.extensions.base_extension import SchemaExtension
|
7
8
|
|
@@ -33,18 +34,30 @@ class MaskErrors(SchemaExtension):
|
|
33
34
|
original_error=None,
|
34
35
|
)
|
35
36
|
|
37
|
+
# TODO: proper typing
|
38
|
+
def _process_result(self, result: Any) -> None:
|
39
|
+
if not result.errors:
|
40
|
+
return
|
41
|
+
|
42
|
+
processed_errors: list[GraphQLError] = []
|
43
|
+
|
44
|
+
for error in result.errors:
|
45
|
+
if self.should_mask_error(error):
|
46
|
+
processed_errors.append(self.anonymise_error(error))
|
47
|
+
else:
|
48
|
+
processed_errors.append(error)
|
49
|
+
|
50
|
+
result.errors = processed_errors
|
51
|
+
|
36
52
|
def on_operation(self) -> Iterator[None]:
|
37
53
|
yield
|
54
|
+
|
38
55
|
result = self.execution_context.result
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
else:
|
45
|
-
processed_errors.append(error)
|
46
|
-
|
47
|
-
result.errors = processed_errors
|
56
|
+
|
57
|
+
if isinstance(result, ExecutionResult):
|
58
|
+
self._process_result(result)
|
59
|
+
else:
|
60
|
+
self._process_result(result.initial_result)
|
48
61
|
|
49
62
|
|
50
63
|
__all__ = ["MaskErrors"]
|
@@ -14,6 +14,11 @@ class GraphQLHTTPResponse(TypedDict, total=False):
|
|
14
14
|
data: Optional[dict[str, object]]
|
15
15
|
errors: Optional[list[object]]
|
16
16
|
extensions: Optional[dict[str, object]]
|
17
|
+
hasNext: Optional[bool]
|
18
|
+
completed: Optional[list[Any]]
|
19
|
+
pending: Optional[list[Any]]
|
20
|
+
initial: Optional[list[Any]]
|
21
|
+
incremental: Optional[list[Any]]
|
17
22
|
|
18
23
|
|
19
24
|
def process_result(result: ResultType) -> GraphQLHTTPResponse:
|
@@ -201,8 +201,6 @@ class AsyncBaseHTTPView(
|
|
201
201
|
if not self.allow_queries_via_get and request_adapter.method == "GET":
|
202
202
|
allowed_operation_types = allowed_operation_types - {OperationType.QUERY}
|
203
203
|
|
204
|
-
assert self.schema
|
205
|
-
|
206
204
|
if request_data.protocol == "multipart-subscription":
|
207
205
|
return await self.schema.subscribe(
|
208
206
|
request_data.query, # type: ignore
|
@@ -266,7 +264,7 @@ class AsyncBaseHTTPView(
|
|
266
264
|
root_value: Optional[RootValue] = UNSET,
|
267
265
|
) -> WebSocketResponse: ...
|
268
266
|
|
269
|
-
async def run(
|
267
|
+
async def run(
|
270
268
|
self,
|
271
269
|
request: Union[Request, WebSocketRequest],
|
272
270
|
context: Context = UNSET,
|
@@ -294,7 +292,7 @@ class AsyncBaseHTTPView(
|
|
294
292
|
view=self,
|
295
293
|
websocket=websocket,
|
296
294
|
context=context,
|
297
|
-
root_value=root_value,
|
295
|
+
root_value=root_value,
|
298
296
|
schema=self.schema,
|
299
297
|
debug=self.debug,
|
300
298
|
connection_init_wait_timeout=self.connection_init_wait_timeout,
|
@@ -304,7 +302,7 @@ class AsyncBaseHTTPView(
|
|
304
302
|
view=self,
|
305
303
|
websocket=websocket,
|
306
304
|
context=context,
|
307
|
-
root_value=root_value,
|
305
|
+
root_value=root_value,
|
308
306
|
schema=self.schema,
|
309
307
|
debug=self.debug,
|
310
308
|
keep_alive=self.keep_alive,
|
@@ -605,9 +603,23 @@ class AsyncBaseHTTPView(
|
|
605
603
|
else:
|
606
604
|
raise HTTPException(400, "Unsupported content type")
|
607
605
|
|
606
|
+
query = data.get("query")
|
607
|
+
if not isinstance(query, (str, type(None))):
|
608
|
+
raise HTTPException(
|
609
|
+
400,
|
610
|
+
"The GraphQL operation's `query` must be a string or null, if provided.",
|
611
|
+
)
|
612
|
+
|
613
|
+
variables = data.get("variables")
|
614
|
+
if not isinstance(variables, (dict, type(None))):
|
615
|
+
raise HTTPException(
|
616
|
+
400,
|
617
|
+
"The GraphQL operation's `variables` must be an object or null, if provided.",
|
618
|
+
)
|
619
|
+
|
608
620
|
return GraphQLRequestData(
|
609
|
-
query=
|
610
|
-
variables=
|
621
|
+
query=query,
|
622
|
+
variables=variables,
|
611
623
|
operation_name=data.get("operationName"),
|
612
624
|
extensions=data.get("extensions"),
|
613
625
|
protocol=protocol,
|
@@ -116,8 +116,6 @@ class SyncBaseHTTPView(
|
|
116
116
|
if not self.allow_queries_via_get and request_adapter.method == "GET":
|
117
117
|
allowed_operation_types = allowed_operation_types - {OperationType.QUERY}
|
118
118
|
|
119
|
-
assert self.schema
|
120
|
-
|
121
119
|
return self.schema.execute_sync(
|
122
120
|
request_data.query,
|
123
121
|
root_value=root_value,
|
@@ -154,9 +152,23 @@ class SyncBaseHTTPView(
|
|
154
152
|
else:
|
155
153
|
raise HTTPException(400, "Unsupported content type")
|
156
154
|
|
155
|
+
query = data.get("query")
|
156
|
+
if not isinstance(query, (str, type(None))):
|
157
|
+
raise HTTPException(
|
158
|
+
400,
|
159
|
+
"The GraphQL operation's `query` must be a string or null, if provided.",
|
160
|
+
)
|
161
|
+
|
162
|
+
variables = data.get("variables")
|
163
|
+
if not isinstance(variables, (dict, type(None))):
|
164
|
+
raise HTTPException(
|
165
|
+
400,
|
166
|
+
"The GraphQL operation's `variables` must be an object or null, if provided.",
|
167
|
+
)
|
168
|
+
|
157
169
|
return GraphQLRequestData(
|
158
|
-
query=
|
159
|
-
variables=
|
170
|
+
query=query,
|
171
|
+
variables=variables,
|
160
172
|
operation_name=data.get("operationName"),
|
161
173
|
extensions=data.get("extensions"),
|
162
174
|
)
|
@@ -7,11 +7,14 @@ from graphql.execution import execute, subscribe
|
|
7
7
|
from strawberry.types import ExecutionResult
|
8
8
|
|
9
9
|
try:
|
10
|
-
from graphql import (
|
10
|
+
from graphql import ( # type: ignore[attr-defined]
|
11
11
|
ExperimentalIncrementalExecutionResults as GraphQLIncrementalExecutionResults,
|
12
12
|
)
|
13
|
-
from graphql.execution import
|
14
|
-
|
13
|
+
from graphql.execution import ( # type: ignore[attr-defined]
|
14
|
+
InitialIncrementalExecutionResult,
|
15
|
+
experimental_execute_incrementally,
|
16
|
+
)
|
17
|
+
from graphql.type.directives import ( # type: ignore[attr-defined]
|
15
18
|
GraphQLDeferDirective,
|
16
19
|
GraphQLStreamDirective,
|
17
20
|
)
|
@@ -21,10 +24,14 @@ try:
|
|
21
24
|
GraphQLStreamDirective,
|
22
25
|
)
|
23
26
|
|
27
|
+
GraphQLExecutionResult = Union[
|
28
|
+
GraphQLExecutionResult, InitialIncrementalExecutionResult
|
29
|
+
]
|
30
|
+
|
24
31
|
except ImportError:
|
25
32
|
GraphQLIncrementalExecutionResults = type(None)
|
26
33
|
|
27
|
-
incremental_execution_directives =
|
34
|
+
incremental_execution_directives = () # type: ignore
|
28
35
|
experimental_execute_incrementally = None
|
29
36
|
|
30
37
|
|
@@ -84,7 +84,6 @@ if TYPE_CHECKING:
|
|
84
84
|
from collections.abc import Iterable, Mapping
|
85
85
|
from typing_extensions import TypeAlias
|
86
86
|
|
87
|
-
from graphql.execution.collect_fields import FieldGroup # type: ignore
|
88
87
|
from graphql.language import DocumentNode
|
89
88
|
from graphql.pyutils import Path
|
90
89
|
from graphql.type import GraphQLResolveInfo
|
@@ -176,17 +175,18 @@ class StrawberryGraphQLCoreExecutionContext(GraphQLExecutionContext):
|
|
176
175
|
|
177
176
|
self.operation_extensions = operation_extensions
|
178
177
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
178
|
+
if IS_GQL_33:
|
179
|
+
|
180
|
+
def build_resolve_info(
|
181
|
+
self,
|
182
|
+
field_def: GraphQLField,
|
183
|
+
field_nodes: list[FieldNode],
|
184
|
+
parent_type: GraphQLObjectType,
|
185
|
+
path: Path,
|
186
|
+
) -> GraphQLResolveInfo:
|
187
187
|
return _OperationContextAwareGraphQLResolveInfo( # type: ignore
|
188
|
-
|
189
|
-
|
188
|
+
field_nodes[0].name.value,
|
189
|
+
field_nodes,
|
190
190
|
field_def.type,
|
191
191
|
parent_type,
|
192
192
|
path,
|
@@ -200,13 +200,6 @@ class StrawberryGraphQLCoreExecutionContext(GraphQLExecutionContext):
|
|
200
200
|
self.operation_extensions,
|
201
201
|
)
|
202
202
|
|
203
|
-
return super().build_resolve_info(
|
204
|
-
field_def,
|
205
|
-
field_group,
|
206
|
-
parent_type,
|
207
|
-
path,
|
208
|
-
)
|
209
|
-
|
210
203
|
|
211
204
|
class Schema(BaseSchema):
|
212
205
|
def __init__(
|
@@ -329,7 +322,7 @@ class Schema(BaseSchema):
|
|
329
322
|
graphql_types.append(graphql_type)
|
330
323
|
|
331
324
|
try:
|
332
|
-
directives = specified_directives + tuple(graphql_directives)
|
325
|
+
directives = specified_directives + tuple(graphql_directives) # type: ignore
|
333
326
|
|
334
327
|
if self.config.enable_experimental_incremental_execution:
|
335
328
|
directives = tuple(directives) + tuple(incremental_execution_directives)
|
@@ -338,7 +331,7 @@ class Schema(BaseSchema):
|
|
338
331
|
query=query_type,
|
339
332
|
mutation=mutation_type,
|
340
333
|
subscription=subscription_type if subscription else None,
|
341
|
-
directives=directives,
|
334
|
+
directives=directives, # type: ignore
|
342
335
|
types=graphql_types,
|
343
336
|
extensions={
|
344
337
|
GraphQLCoreConverter.DEFINITION_BACKREF: self,
|
@@ -53,7 +53,7 @@ class BaseGraphQLTransportWSHandler(Generic[Context, RootValue]):
|
|
53
53
|
view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
|
54
54
|
websocket: AsyncWebSocketAdapter,
|
55
55
|
context: Context,
|
56
|
-
root_value: RootValue,
|
56
|
+
root_value: Optional[RootValue],
|
57
57
|
schema: BaseSchema,
|
58
58
|
debug: bool,
|
59
59
|
connection_init_wait_timeout: timedelta,
|
@@ -42,7 +42,7 @@ class BaseGraphQLWSHandler(Generic[Context, RootValue]):
|
|
42
42
|
view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
|
43
43
|
websocket: AsyncWebSocketAdapter,
|
44
44
|
context: Context,
|
45
|
-
root_value: RootValue,
|
45
|
+
root_value: Optional[RootValue],
|
46
46
|
schema: BaseSchema,
|
47
47
|
debug: bool,
|
48
48
|
keep_alive: bool,
|
@@ -144,12 +144,52 @@ class StrawberryArgument:
|
|
144
144
|
return isinstance(self.type, StrawberryMaybe)
|
145
145
|
|
146
146
|
|
147
|
+
def _is_leaf_type(
|
148
|
+
type_: Union[StrawberryType, type],
|
149
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
150
|
+
skip_classes: tuple[type, ...] = (),
|
151
|
+
) -> bool:
|
152
|
+
if type_ in skip_classes:
|
153
|
+
return False
|
154
|
+
|
155
|
+
if is_scalar(type_, scalar_registry):
|
156
|
+
return True
|
157
|
+
|
158
|
+
if isinstance(type_, EnumDefinition):
|
159
|
+
return True
|
160
|
+
|
161
|
+
if isinstance(type_, LazyType):
|
162
|
+
return _is_leaf_type(type_.resolve_type(), scalar_registry)
|
163
|
+
|
164
|
+
if hasattr(type_, "_enum_definition"):
|
165
|
+
enum_definition: EnumDefinition = type_._enum_definition
|
166
|
+
return _is_leaf_type(enum_definition, scalar_registry)
|
167
|
+
|
168
|
+
return False
|
169
|
+
|
170
|
+
|
171
|
+
def _is_optional_leaf_type(
|
172
|
+
type_: Union[StrawberryType, type],
|
173
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
174
|
+
skip_classes: tuple[type, ...] = (),
|
175
|
+
) -> bool:
|
176
|
+
if type_ in skip_classes:
|
177
|
+
return False
|
178
|
+
|
179
|
+
if isinstance(type_, StrawberryOptional):
|
180
|
+
return _is_leaf_type(type_.of_type, scalar_registry, skip_classes)
|
181
|
+
|
182
|
+
return False
|
183
|
+
|
184
|
+
|
147
185
|
def convert_argument(
|
148
186
|
value: object,
|
149
187
|
type_: Union[StrawberryType, type],
|
150
188
|
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
151
189
|
config: StrawberryConfig,
|
152
190
|
) -> object:
|
191
|
+
from strawberry.relay.types import GlobalID
|
192
|
+
|
153
193
|
# TODO: move this somewhere else and make it first class
|
154
194
|
if isinstance(type_, StrawberryOptional):
|
155
195
|
res = convert_argument(value, type_.of_type, scalar_registry, config)
|
@@ -164,22 +204,27 @@ def convert_argument(
|
|
164
204
|
|
165
205
|
if isinstance(type_, StrawberryList):
|
166
206
|
value_list = cast("Iterable", value)
|
207
|
+
|
208
|
+
if _is_leaf_type(
|
209
|
+
type_.of_type, scalar_registry, skip_classes=(GlobalID,)
|
210
|
+
) or _is_optional_leaf_type(
|
211
|
+
type_.of_type, scalar_registry, skip_classes=(GlobalID,)
|
212
|
+
):
|
213
|
+
return value_list
|
214
|
+
|
215
|
+
value_list = cast("Iterable", value)
|
216
|
+
|
167
217
|
return [
|
168
218
|
convert_argument(x, type_.of_type, scalar_registry, config)
|
169
219
|
for x in value_list
|
170
220
|
]
|
171
221
|
|
172
|
-
if
|
173
|
-
from strawberry.relay.types import GlobalID
|
174
|
-
|
222
|
+
if _is_leaf_type(type_, scalar_registry):
|
175
223
|
if type_ is GlobalID:
|
176
224
|
return GlobalID.from_id(value) # type: ignore
|
177
225
|
|
178
226
|
return value
|
179
227
|
|
180
|
-
if isinstance(type_, EnumDefinition):
|
181
|
-
return value
|
182
|
-
|
183
228
|
if isinstance(type_, LazyType):
|
184
229
|
return convert_argument(value, type_.resolve_type(), scalar_registry, config)
|
185
230
|
|
@@ -18,11 +18,11 @@ if TYPE_CHECKING:
|
|
18
18
|
from typing_extensions import NotRequired
|
19
19
|
|
20
20
|
from graphql import ASTValidationRule
|
21
|
-
from graphql import ExecutionResult as GraphQLExecutionResult
|
22
21
|
from graphql.error.graphql_error import GraphQLError
|
23
22
|
from graphql.language import DocumentNode, OperationDefinitionNode
|
24
23
|
|
25
24
|
from strawberry.schema import Schema
|
25
|
+
from strawberry.schema._graphql_core import GraphQLExecutionResult
|
26
26
|
|
27
27
|
from .graphql import OperationType
|
28
28
|
|
{strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/LICENSE
RENAMED
File without changes
|
{strawberry_graphql-0.276.0.dev1750672223 → strawberry_graphql-0.276.0.dev1752831589}/README.md
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
|
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
|
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
|