strawberry-graphql 0.257.0__tar.gz → 0.257.0.dev1735244504__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.257.0 → strawberry_graphql-0.257.0.dev1735244504}/PKG-INFO +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/pyproject.toml +95 -82
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/__init__.py +0 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/aiohttp/test/client.py +3 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/aiohttp/views.py +3 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/annotation.py +7 -5
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/asgi/__init__.py +4 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/handlers/ws_handler.py +3 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/testing.py +1 -3
- strawberry_graphql-0.257.0.dev1735244504/strawberry/cli/__init__.py +15 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/codegen.py +14 -12
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/server.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/upgrade/_run_codemod.py +3 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/utils/__init__.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/plugins/python.py +5 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/plugins/typescript.py +2 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/query_codegen.py +11 -12
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codemods/annotated_unions.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codemods/update_imports.py +4 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/dataloader.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/__init__.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/views.py +3 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/__init__.py +2 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/exception.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/permission_fail_silently_requires_optional.py +1 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/utils/source_finder.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/_compat.py +4 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/conversion.py +5 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/fields.py +2 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/object_type.py +2 -6
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/utils.py +9 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/mypy_plugin.py +14 -7
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/context.py +19 -15
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/field_extension.py +54 -53
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/query_depth_limiter.py +33 -27
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/tracing/datadog.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/tracing/opentelemetry.py +14 -9
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/fastapi/router.py +3 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/schema.py +3 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/flask/views.py +2 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/async_base_view.py +4 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/ides.py +3 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/sync_base_view.py +2 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/litestar/controller.py +5 -6
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/permission.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/quart/views.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/relay/fields.py +3 -28
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/relay/types.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/base.py +2 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/execute.py +11 -11
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/name_converter.py +5 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/schema.py +4 -6
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/schema_converter.py +19 -24
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/subscribe.py +4 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/types/base_scalars.py +2 -4
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/types/scalar.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema_codegen/__init__.py +6 -5
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +3 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/test/client.py +2 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/arguments.py +2 -2
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/auto.py +3 -3
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/base.py +16 -12
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/field.py +7 -11
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/fields/resolver.py +19 -12
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/union.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/unset.py +2 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/debug.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/deprecations.py +1 -1
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/graphql_lexer.py +4 -6
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/typing.py +2 -1
- strawberry_graphql-0.257.0/strawberry/cli/__init__.py +0 -17
- strawberry_graphql-0.257.0/strawberry/types/cast.py +0 -35
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/LICENSE +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/README.md +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/utils/str_converters.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "strawberry-graphql"
|
3
3
|
packages = [ { include = "strawberry" } ]
|
4
|
-
version = "0.257.0"
|
4
|
+
version = "0.257.0.dev.1735244504"
|
5
5
|
description = "A library for creating GraphQL APIs"
|
6
6
|
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
7
|
license = "MIT"
|
@@ -228,69 +228,125 @@ src = ["strawberry", "tests"]
|
|
228
228
|
select = ["ALL"]
|
229
229
|
ignore = [
|
230
230
|
# https://github.com/astral-sh/ruff/pull/4427
|
231
|
-
# equivalent to keep-runtime-typing
|
232
|
-
# after we drop support for Python 3.9
|
231
|
+
# equivalent to keep-runtime-typing
|
233
232
|
"UP006",
|
234
233
|
"UP007",
|
235
234
|
|
235
|
+
"TID252",
|
236
236
|
# we use asserts in tests and to hint mypy
|
237
237
|
"S101",
|
238
|
-
|
239
|
-
|
240
|
-
|
238
|
+
"S102",
|
239
|
+
"S104",
|
240
|
+
"S324",
|
241
|
+
# definitely enable these, maybe not in tests
|
241
242
|
"ANN401",
|
242
|
-
|
243
|
-
# Allow our exceptions to have names that don't end in "Error". Maybe refactor
|
244
|
-
# in the future? But that would be a breaking change.
|
245
|
-
"N818",
|
246
|
-
|
247
|
-
# Allow "type: ignore" without rule code. Because we support both mypy and
|
248
|
-
# pyright, and they have different codes for the same error, we can't properly
|
249
|
-
# fix those issues.
|
250
243
|
"PGH003",
|
251
|
-
|
244
|
+
"PGH004",
|
245
|
+
"RET504",
|
246
|
+
"RET505",
|
247
|
+
"RET506",
|
248
|
+
"RET507",
|
249
|
+
"RET503",
|
250
|
+
"BLE001",
|
251
|
+
"B008",
|
252
|
+
"N811",
|
253
|
+
"N804",
|
254
|
+
"N818",
|
252
255
|
# Variable `T` in function should be lowercase
|
253
256
|
# this seems a potential bug or opportunity for improvement in ruff
|
254
257
|
"N806",
|
255
258
|
|
259
|
+
# first argument should named self (found in tests)
|
260
|
+
"N805",
|
261
|
+
|
262
|
+
"N815",
|
263
|
+
|
256
264
|
# shadowing builtins
|
257
265
|
"A001",
|
258
266
|
"A002",
|
259
267
|
"A003",
|
260
268
|
|
261
|
-
# Unused arguments
|
262
269
|
"ARG001",
|
263
270
|
"ARG002",
|
264
271
|
"ARG003",
|
265
272
|
"ARG004",
|
266
273
|
"ARG005",
|
267
|
-
|
268
|
-
# Boolean positional arguments
|
269
274
|
"FBT001",
|
270
275
|
"FBT002",
|
271
276
|
"FBT003",
|
272
277
|
|
273
|
-
|
274
|
-
"
|
275
|
-
"PLR0912",
|
276
|
-
"PLR0911",
|
278
|
+
"PT001",
|
279
|
+
"PT023",
|
277
280
|
|
278
|
-
#
|
279
|
-
"
|
281
|
+
# this is pretty much handled by black
|
282
|
+
"E501",
|
283
|
+
|
284
|
+
# enable these, we have some in tests
|
285
|
+
"B006",
|
286
|
+
"PT007",
|
287
|
+
"PT011",
|
288
|
+
"PT012",
|
289
|
+
"PT015",
|
290
|
+
"PT017",
|
291
|
+
"C414",
|
292
|
+
"N802",
|
293
|
+
|
294
|
+
"SIM117",
|
295
|
+
"SIM102",
|
296
|
+
|
297
|
+
"F841",
|
298
|
+
"B027",
|
299
|
+
"B905",
|
300
|
+
"ISC001",
|
280
301
|
|
281
|
-
#
|
302
|
+
# same?
|
303
|
+
"S105",
|
304
|
+
"S106",
|
305
|
+
|
306
|
+
"DTZ003",
|
307
|
+
"DTZ005",
|
308
|
+
|
309
|
+
"RSE102",
|
282
310
|
"SLF001",
|
283
311
|
|
312
|
+
# in tests
|
313
|
+
"DTZ001",
|
314
|
+
|
315
|
+
"EM101",
|
316
|
+
"EM102",
|
317
|
+
"EM103",
|
318
|
+
|
319
|
+
"B904",
|
320
|
+
"B019",
|
321
|
+
|
322
|
+
"N801",
|
323
|
+
"N807",
|
324
|
+
|
325
|
+
# pandas
|
326
|
+
"PD",
|
327
|
+
|
328
|
+
"RUF012",
|
329
|
+
"PLC0105",
|
330
|
+
"FA102",
|
331
|
+
|
284
332
|
# code complexity
|
333
|
+
"C",
|
285
334
|
"C901",
|
286
335
|
|
287
|
-
#
|
336
|
+
# trailing commas
|
337
|
+
"COM812",
|
338
|
+
|
339
|
+
"PLR",
|
340
|
+
"INP",
|
341
|
+
"TRY",
|
342
|
+
"SIM300",
|
343
|
+
"SIM114",
|
344
|
+
|
345
|
+
"DJ008",
|
288
346
|
"TD002",
|
289
347
|
"TD003",
|
290
348
|
"FIX001",
|
291
349
|
"FIX002",
|
292
|
-
|
293
|
-
# We don't want to add "from __future__ mport annotations" everywhere
|
294
350
|
"FA100",
|
295
351
|
|
296
352
|
# Docstrings, maybe to enable later
|
@@ -303,72 +359,29 @@ ignore = [
|
|
303
359
|
"D106",
|
304
360
|
"D107",
|
305
361
|
"D412",
|
306
|
-
|
307
|
-
# Allow to define exceptions text in the exception body
|
308
|
-
"TRY003",
|
309
|
-
"EM101",
|
310
|
-
"EM102",
|
311
|
-
"EM103",
|
312
|
-
|
313
|
-
# Allow comparisons with magic numbers
|
314
|
-
"PLR2004",
|
315
|
-
|
316
|
-
# Allow methods to use lru_cache
|
317
|
-
"B019",
|
318
|
-
|
319
|
-
# Don't force if branches to be converted to "or"
|
320
|
-
"SIM114",
|
321
|
-
|
322
|
-
# ruff formatter recommends to disable those, as they conflict with it
|
323
|
-
# we don't need to ever enable those.
|
324
|
-
"COM812",
|
325
|
-
"COM819",
|
326
|
-
"D206",
|
327
|
-
"E111",
|
328
|
-
"E114",
|
329
|
-
"E117",
|
330
|
-
"E501",
|
331
|
-
"ISC001",
|
332
|
-
"Q000",
|
333
|
-
"Q001",
|
334
|
-
"Q002",
|
335
|
-
"Q003",
|
336
|
-
"W191",
|
337
362
|
]
|
338
363
|
|
339
364
|
[tool.ruff.lint.per-file-ignores]
|
340
|
-
".
|
341
|
-
"federation-compatibility/*" = ["INP001"]
|
342
|
-
"strawberry/cli/*" = ["B008"]
|
343
|
-
"strawberry/extensions/tracing/__init__.py" = ["TCH004"]
|
344
|
-
"strawberry/fastapi/*" = ["B008"]
|
345
|
-
"strawberry/annotation.py" = ["RET505"]
|
365
|
+
"strawberry/schema/types/concrete_type.py" = ["TCH002"]
|
346
366
|
"tests/*" = [
|
367
|
+
"RSE102",
|
368
|
+
"SLF001",
|
369
|
+
"TCH001",
|
370
|
+
"TCH002",
|
371
|
+
"TCH003",
|
347
372
|
"ANN001",
|
348
373
|
"ANN201",
|
349
374
|
"ANN202",
|
350
375
|
"ANN204",
|
351
|
-
"B008",
|
352
|
-
"B018",
|
353
|
-
"D",
|
354
|
-
"DTZ001",
|
355
|
-
"DTZ005",
|
356
|
-
"FA102",
|
357
|
-
"N805",
|
358
|
-
"PLC1901",
|
359
|
-
"PLR2004",
|
360
376
|
"PLW0603",
|
361
|
-
"
|
362
|
-
"RUF012",
|
363
|
-
"S105",
|
364
|
-
"S106",
|
377
|
+
"PLC1901",
|
365
378
|
"S603",
|
366
379
|
"S607",
|
367
|
-
"
|
368
|
-
"
|
369
|
-
"TCH003",
|
370
|
-
"TRY002",
|
380
|
+
"B018",
|
381
|
+
"D",
|
371
382
|
]
|
383
|
+
"strawberry/extensions/tracing/__init__.py" = ["TCH004"]
|
384
|
+
"tests/http/clients/__init__.py" = ["F401"]
|
372
385
|
|
373
386
|
[tool.ruff.lint.isort]
|
374
387
|
known-first-party = ["strawberry"]
|
{strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/__init__.py
RENAMED
@@ -13,7 +13,6 @@ from .schema import Schema
|
|
13
13
|
from .schema_directive import schema_directive
|
14
14
|
from .types.arguments import argument
|
15
15
|
from .types.auto import auto
|
16
|
-
from .types.cast import cast
|
17
16
|
from .types.enum import enum, enum_value
|
18
17
|
from .types.field import field
|
19
18
|
from .types.info import Info
|
@@ -37,7 +36,6 @@ __all__ = [
|
|
37
36
|
"argument",
|
38
37
|
"asdict",
|
39
38
|
"auto",
|
40
|
-
"cast",
|
41
39
|
"directive",
|
42
40
|
"directive_field",
|
43
41
|
"enum",
|
@@ -57,11 +57,13 @@ class GraphQLTestClient(BaseGraphQLTestClient):
|
|
57
57
|
headers: Optional[dict[str, object]] = None,
|
58
58
|
files: Optional[dict[str, object]] = None,
|
59
59
|
) -> Any:
|
60
|
-
|
60
|
+
response = await self._client.post(
|
61
61
|
self.url,
|
62
62
|
json=body if not files else None,
|
63
63
|
data=body if files else None,
|
64
64
|
)
|
65
65
|
|
66
|
+
return response
|
67
|
+
|
66
68
|
|
67
69
|
__all__ = ["GraphQLTestClient"]
|
{strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/aiohttp/views.py
RENAMED
@@ -99,12 +99,12 @@ class AioHTTPWebSocketAdapter(AsyncWebSocketAdapter):
|
|
99
99
|
if ws_message.type == http.WSMsgType.TEXT:
|
100
100
|
try:
|
101
101
|
yield self.view.decode_json(ws_message.data)
|
102
|
-
except JSONDecodeError
|
102
|
+
except JSONDecodeError:
|
103
103
|
if not ignore_parsing_errors:
|
104
|
-
raise NonJsonMessageReceived
|
104
|
+
raise NonJsonMessageReceived()
|
105
105
|
|
106
106
|
elif ws_message.type == http.WSMsgType.BINARY:
|
107
|
-
raise NonTextMessageReceived
|
107
|
+
raise NonTextMessageReceived()
|
108
108
|
|
109
109
|
async def send_json(self, message: Mapping[str, object]) -> None:
|
110
110
|
try:
|
{strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/annotation.py
RENAMED
@@ -107,7 +107,9 @@ class StrawberryAnnotation:
|
|
107
107
|
if isinstance(annotation, str):
|
108
108
|
annotation = ForwardRef(annotation)
|
109
109
|
|
110
|
-
|
110
|
+
evaled_type = eval_type(annotation, self.namespace, None)
|
111
|
+
|
112
|
+
return evaled_type
|
111
113
|
|
112
114
|
def _get_type_with_args(
|
113
115
|
self, evaled_type: type[Any]
|
@@ -153,13 +155,13 @@ class StrawberryAnnotation:
|
|
153
155
|
# a StrawberryType
|
154
156
|
if self._is_enum(evaled_type):
|
155
157
|
return self.create_enum(evaled_type)
|
156
|
-
|
158
|
+
elif self._is_optional(evaled_type, args):
|
157
159
|
return self.create_optional(evaled_type)
|
158
|
-
|
160
|
+
elif self._is_union(evaled_type, args):
|
159
161
|
return self.create_union(evaled_type, args)
|
160
|
-
|
162
|
+
elif is_type_var(evaled_type) or evaled_type is Self:
|
161
163
|
return self.create_type_var(cast(TypeVar, evaled_type))
|
162
|
-
|
164
|
+
elif self._is_strawberry_type(evaled_type):
|
163
165
|
# Simply return objects that are already StrawberryTypes
|
164
166
|
return evaled_type
|
165
167
|
|
{strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/asgi/__init__.py
RENAMED
@@ -97,11 +97,11 @@ class ASGIWebSocketAdapter(AsyncWebSocketAdapter):
|
|
97
97
|
try:
|
98
98
|
text = await self.ws.receive_text()
|
99
99
|
yield self.view.decode_json(text)
|
100
|
-
except JSONDecodeError
|
100
|
+
except JSONDecodeError: # noqa: PERF203
|
101
101
|
if not ignore_parsing_errors:
|
102
|
-
raise NonJsonMessageReceived
|
103
|
-
except KeyError
|
104
|
-
raise NonTextMessageReceived
|
102
|
+
raise NonJsonMessageReceived()
|
103
|
+
except KeyError:
|
104
|
+
raise NonTextMessageReceived()
|
105
105
|
except WebSocketDisconnect: # pragma: no cover
|
106
106
|
pass
|
107
107
|
|
@@ -45,13 +45,13 @@ class ChannelsWebSocketAdapter(AsyncWebSocketAdapter):
|
|
45
45
|
break
|
46
46
|
|
47
47
|
if message["message"] is None:
|
48
|
-
raise NonTextMessageReceived
|
48
|
+
raise NonTextMessageReceived()
|
49
49
|
|
50
50
|
try:
|
51
51
|
yield self.view.decode_json(message["message"])
|
52
|
-
except json.JSONDecodeError
|
52
|
+
except json.JSONDecodeError:
|
53
53
|
if not ignore_parsing_errors:
|
54
|
-
raise NonJsonMessageReceived
|
54
|
+
raise NonJsonMessageReceived()
|
55
55
|
|
56
56
|
async def send_json(self, message: Mapping[str, object]) -> None:
|
57
57
|
serialized_message = self.view.encode_json(message)
|
@@ -55,7 +55,7 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
|
|
55
55
|
path: str,
|
56
56
|
headers: Optional[list[tuple[bytes, bytes]]] = None,
|
57
57
|
protocol: str = GRAPHQL_TRANSPORT_WS_PROTOCOL,
|
58
|
-
connection_params: dict
|
58
|
+
connection_params: dict = {},
|
59
59
|
**kwargs: Any,
|
60
60
|
) -> None:
|
61
61
|
"""Create a new communicator.
|
@@ -69,8 +69,6 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
|
|
69
69
|
subprotocols: an ordered list of preferred subprotocols to be sent to the server.
|
70
70
|
**kwargs: additional arguments to be passed to the `WebsocketCommunicator` constructor.
|
71
71
|
"""
|
72
|
-
if connection_params is None:
|
73
|
-
connection_params = {}
|
74
72
|
self.protocol = protocol
|
75
73
|
subprotocols = kwargs.get("subprotocols", [])
|
76
74
|
subprotocols.append(protocol)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
try:
|
2
|
+
from .app import app
|
3
|
+
from .commands.codegen import codegen as codegen # noqa
|
4
|
+
from .commands.export_schema import export_schema as export_schema # noqa
|
5
|
+
from .commands.schema_codegen import schema_codegen as schema_codegen # noqa
|
6
|
+
from .commands.server import server as server # noqa
|
7
|
+
from .commands.upgrade import upgrade as upgrade # noqa
|
8
|
+
|
9
|
+
def run() -> None:
|
10
|
+
app()
|
11
|
+
|
12
|
+
except ModuleNotFoundError as exc:
|
13
|
+
from strawberry.exceptions import MissingOptionalDependenciesError
|
14
|
+
|
15
|
+
raise MissingOptionalDependenciesError(extras=["cli"]) from exc
|
@@ -39,21 +39,23 @@ def _import_plugin(plugin: str) -> Optional[type[QueryCodegenPlugin]]:
|
|
39
39
|
|
40
40
|
assert _is_codegen_plugin(obj)
|
41
41
|
return obj
|
42
|
-
|
43
|
-
symbols = {
|
44
|
-
key: value for key, value in module.__dict__.items() if not key.startswith("__")
|
45
|
-
}
|
46
|
-
|
47
|
-
if "__all__" in module.__dict__:
|
42
|
+
else:
|
48
43
|
symbols = {
|
49
|
-
|
50
|
-
for
|
51
|
-
if
|
44
|
+
key: value
|
45
|
+
for key, value in module.__dict__.items()
|
46
|
+
if not key.startswith("__")
|
52
47
|
}
|
53
48
|
|
54
|
-
|
55
|
-
|
56
|
-
|
49
|
+
if "__all__" in module.__dict__:
|
50
|
+
symbols = {
|
51
|
+
name: symbol
|
52
|
+
for name, symbol in symbols.items()
|
53
|
+
if name in module.__dict__["__all__"]
|
54
|
+
}
|
55
|
+
|
56
|
+
for obj in symbols.values():
|
57
|
+
if _is_codegen_plugin(obj):
|
58
|
+
return obj
|
57
59
|
|
58
60
|
return None
|
59
61
|
|
@@ -25,7 +25,7 @@ class LogLevel(str, Enum):
|
|
25
25
|
@app.command(help="Starts debug server")
|
26
26
|
def server(
|
27
27
|
schema: str,
|
28
|
-
host: str = typer.Option("0.0.0.0", "-h", "--host", show_default=True),
|
28
|
+
host: str = typer.Option("0.0.0.0", "-h", "--host", show_default=True),
|
29
29
|
port: int = typer.Option(8000, "-p", "--port", show_default=True),
|
30
30
|
log_level: LogLevel = typer.Option(
|
31
31
|
"error",
|
@@ -60,7 +60,7 @@ def server(
|
|
60
60
|
"install them by running:\n"
|
61
61
|
r"pip install 'strawberry-graphql\[debug-server]'"
|
62
62
|
)
|
63
|
-
raise typer.Exit(1)
|
63
|
+
raise typer.Exit(1)
|
64
64
|
|
65
65
|
load_schema(schema, app_dir=app_dir)
|
66
66
|
|
@@ -41,8 +41,9 @@ def _execute_transform_wrap(
|
|
41
41
|
additional_kwargs["scratch"] = {}
|
42
42
|
|
43
43
|
# TODO: maybe capture warnings?
|
44
|
-
with open(os.devnull, "w") as null
|
45
|
-
|
44
|
+
with open(os.devnull, "w") as null: # noqa: PTH123
|
45
|
+
with contextlib.redirect_stderr(null):
|
46
|
+
return _execute_transform(**job, **additional_kwargs)
|
46
47
|
|
47
48
|
|
48
49
|
def _get_progress_and_pool(
|
@@ -16,7 +16,7 @@ def load_schema(schema: str, app_dir: str) -> Schema:
|
|
16
16
|
message = str(exc)
|
17
17
|
|
18
18
|
rich.print(f"[red]Error: {message}")
|
19
|
-
raise typer.Exit(2)
|
19
|
+
raise typer.Exit(2)
|
20
20
|
|
21
21
|
if not isinstance(schema_symbol, Schema):
|
22
22
|
message = "The `schema` must be an instance of strawberry.Schema"
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
3
3
|
import textwrap
|
4
4
|
from collections import defaultdict
|
5
5
|
from dataclasses import dataclass
|
6
|
-
from typing import TYPE_CHECKING,
|
6
|
+
from typing import TYPE_CHECKING, Optional
|
7
7
|
|
8
8
|
from strawberry.codegen import CodegenFile, QueryCodegenPlugin
|
9
9
|
from strawberry.codegen.types import (
|
@@ -35,7 +35,7 @@ class PythonType:
|
|
35
35
|
|
36
36
|
|
37
37
|
class PythonPlugin(QueryCodegenPlugin):
|
38
|
-
SCALARS_TO_PYTHON_TYPES:
|
38
|
+
SCALARS_TO_PYTHON_TYPES: dict[str, PythonType] = {
|
39
39
|
"ID": PythonType("str"),
|
40
40
|
"Int": PythonType("int"),
|
41
41
|
"String": PythonType("str"),
|
@@ -128,7 +128,7 @@ class PythonPlugin(QueryCodegenPlugin):
|
|
128
128
|
+ ", ".join(self._print_argument_value(v) for v in argval.values)
|
129
129
|
+ "]"
|
130
130
|
)
|
131
|
-
|
131
|
+
elif isinstance(argval.values, dict):
|
132
132
|
return (
|
133
133
|
"{"
|
134
134
|
+ ", ".join(
|
@@ -137,7 +137,8 @@ class PythonPlugin(QueryCodegenPlugin):
|
|
137
137
|
)
|
138
138
|
+ "}"
|
139
139
|
)
|
140
|
-
|
140
|
+
else:
|
141
|
+
raise TypeError(f"Unrecognized values type: {argval}")
|
141
142
|
if isinstance(argval, GraphQLEnumValue):
|
142
143
|
# This is an enum. It needs the namespace alongside the name.
|
143
144
|
if argval.enum_type is None:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import textwrap
|
4
|
-
from typing import TYPE_CHECKING
|
4
|
+
from typing import TYPE_CHECKING
|
5
5
|
|
6
6
|
from strawberry.codegen import CodegenFile, QueryCodegenPlugin
|
7
7
|
from strawberry.codegen.types import (
|
@@ -20,7 +20,7 @@ if TYPE_CHECKING:
|
|
20
20
|
|
21
21
|
|
22
22
|
class TypeScriptPlugin(QueryCodegenPlugin):
|
23
|
-
SCALARS_TO_TS_TYPE
|
23
|
+
SCALARS_TO_TS_TYPE = {
|
24
24
|
"ID": "string",
|
25
25
|
"Int": "number",
|
26
26
|
"String": "string",
|
@@ -102,7 +102,6 @@ class TypeScriptPlugin(QueryCodegenPlugin):
|
|
102
102
|
if type_.name in self.SCALARS_TO_TS_TYPE:
|
103
103
|
return ""
|
104
104
|
|
105
|
-
assert type_.python_type is not None
|
106
105
|
return f"type {type_.name} = {self.SCALARS_TO_TS_TYPE[type_.python_type]}"
|
107
106
|
|
108
107
|
def _print_union_type(self, type_: GraphQLUnion) -> str:
|
@@ -202,7 +202,7 @@ def _get_deps(t: GraphQLType) -> Iterable[GraphQLType]:
|
|
202
202
|
yield from _get_deps(gql_type)
|
203
203
|
else:
|
204
204
|
# Want to make sure that all types are covered.
|
205
|
-
raise ValueError(f"Unknown GraphQLType: {t}")
|
205
|
+
raise ValueError(f"Unknown GraphQLType: {t}")
|
206
206
|
|
207
207
|
|
208
208
|
_TYPE_TO_GRAPHQL_TYPE = {
|
@@ -249,15 +249,14 @@ class QueryCodegenPluginManager:
|
|
249
249
|
def type_cmp(t1: GraphQLType, t2: GraphQLType) -> int:
|
250
250
|
"""Compare the types."""
|
251
251
|
if t1 is t2:
|
252
|
-
|
253
|
-
|
254
|
-
|
252
|
+
return 0
|
253
|
+
|
254
|
+
if t1 in _get_deps(t2):
|
255
|
+
return -1
|
255
256
|
elif t2 in _get_deps(t1):
|
256
|
-
|
257
|
+
return 1
|
257
258
|
else:
|
258
|
-
|
259
|
-
|
260
|
-
return retval
|
259
|
+
return 0
|
261
260
|
|
262
261
|
return sorted(types, key=cmp_to_key(type_cmp))
|
263
262
|
|
@@ -312,15 +311,15 @@ class QueryCodegen:
|
|
312
311
|
operations = self._get_operations(ast)
|
313
312
|
|
314
313
|
if not operations:
|
315
|
-
raise NoOperationProvidedError
|
314
|
+
raise NoOperationProvidedError()
|
316
315
|
|
317
316
|
if len(operations) > 1:
|
318
|
-
raise MultipleOperationsProvidedError
|
317
|
+
raise MultipleOperationsProvidedError()
|
319
318
|
|
320
319
|
operation = operations[0]
|
321
320
|
|
322
321
|
if operation.name is None:
|
323
|
-
raise NoOperationNameProvidedError
|
322
|
+
raise NoOperationNameProvidedError()
|
324
323
|
|
325
324
|
# Look for any free-floating fragments and create types out of them
|
326
325
|
# These types can then be referenced and included later via the
|
@@ -551,7 +550,7 @@ class QueryCodegen:
|
|
551
550
|
if isinstance(field_type, ScalarDefinition):
|
552
551
|
return self._collect_scalar(field_type, None)
|
553
552
|
|
554
|
-
|
553
|
+
elif isinstance(field_type, EnumDefinition):
|
555
554
|
return self._collect_enum(field_type)
|
556
555
|
|
557
556
|
raise ValueError(f"Unsupported type: {field_type}") # pragma: no cover
|
@@ -50,7 +50,7 @@ class ConvertUnionToAnnotatedUnion(VisitorBasedCodemodCommand):
|
|
50
50
|
|
51
51
|
super().__init__(context)
|
52
52
|
|
53
|
-
def visit_Module(self, node: cst.Module) -> Optional[bool]:
|
53
|
+
def visit_Module(self, node: cst.Module) -> Optional[bool]:
|
54
54
|
self._is_using_named_import = False
|
55
55
|
|
56
56
|
return super().visit_Module(node)
|
@@ -126,9 +126,11 @@ class UpdateImportsCodemod(VisitorBasedCodemodCommand):
|
|
126
126
|
|
127
127
|
return updated_node
|
128
128
|
|
129
|
-
def leave_ImportFrom(
|
129
|
+
def leave_ImportFrom(
|
130
130
|
self, node: cst.ImportFrom, updated_node: cst.ImportFrom
|
131
131
|
) -> cst.ImportFrom:
|
132
132
|
updated_node = self._update_imports(updated_node, updated_node)
|
133
133
|
updated_node = self._update_types_types_imports(updated_node, updated_node)
|
134
|
-
|
134
|
+
updated_node = self._update_strawberry_type_imports(updated_node, updated_node)
|
135
|
+
|
136
|
+
return updated_node
|
{strawberry_graphql-0.257.0 → strawberry_graphql-0.257.0.dev1735244504}/strawberry/dataloader.py
RENAMED
@@ -240,7 +240,7 @@ async def dispatch_batch(loader: DataLoader, batch: Batch) -> None:
|
|
240
240
|
values = list(values)
|
241
241
|
|
242
242
|
if len(values) != len(batch):
|
243
|
-
raise WrongNumberOfResultsReturned(
|
243
|
+
raise WrongNumberOfResultsReturned(
|
244
244
|
expected=len(batch), received=len(values)
|
245
245
|
)
|
246
246
|
|
@@ -254,7 +254,7 @@ async def dispatch_batch(loader: DataLoader, batch: Batch) -> None:
|
|
254
254
|
task.future.set_exception(value)
|
255
255
|
else:
|
256
256
|
task.future.set_result(value)
|
257
|
-
except Exception as e:
|
257
|
+
except Exception as e:
|
258
258
|
for task in batch.tasks:
|
259
259
|
task.future.set_exception(e)
|
260
260
|
|
@@ -12,9 +12,9 @@ except ModuleNotFoundError:
|
|
12
12
|
import_symbol = f"{__name__}.{name}"
|
13
13
|
try:
|
14
14
|
return importlib.import_module(import_symbol)
|
15
|
-
except ModuleNotFoundError
|
15
|
+
except ModuleNotFoundError:
|
16
16
|
raise AttributeError(
|
17
17
|
f"Attempted import of {import_symbol} failed. Make sure to install the"
|
18
18
|
"'strawberry-graphql-django' package to use the Strawberry Django "
|
19
19
|
"extension API."
|
20
|
-
)
|
20
|
+
)
|