strawberry-graphql 0.221.0.dev1710955937__tar.gz → 0.221.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/PKG-INFO +1 -1
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/pyproject.toml +2 -2
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/__init__.py +2 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/field_extensions/input_mutation.py +1 -1
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema_codegen/__init__.py +15 -196
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/fields/resolver.py +1 -1
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/info.py +19 -3
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/LICENSE +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/README.md +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/arguments.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/auto.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/custom_scalar.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/enum.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/sentry.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/field.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/async_base_view.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/lazy_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/litestar/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/litestar/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/mutation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/object_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/private.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/execute.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/schema.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/starlite/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/starlite/controller.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/starlite/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/type.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/types.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/union.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/unset.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/utils/typing.py +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "strawberry-graphql"
|
3
3
|
packages = [ { include = "strawberry" } ]
|
4
|
-
version = "0.221.
|
4
|
+
version = "0.221.1"
|
5
5
|
description = "A library for creating GraphQL APIs"
|
6
6
|
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
7
|
license = "MIT"
|
@@ -97,7 +97,7 @@ types-toml = "^0.10.8"
|
|
97
97
|
types-typed-ast = "^1.5.8"
|
98
98
|
types-ujson = "^5.6.0"
|
99
99
|
types-protobuf = "^4.23.0.1"
|
100
|
-
mypy = "1.
|
100
|
+
mypy = "1.9.0"
|
101
101
|
pytest-mypy-plugins = ">=1.10,<4.0"
|
102
102
|
poetry-plugin-export = "^1.6.0"
|
103
103
|
# another bug in poetry
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/__init__.py
RENAMED
@@ -14,6 +14,7 @@ from .private import Private
|
|
14
14
|
from .scalars import ID
|
15
15
|
from .schema import Schema
|
16
16
|
from .schema_directive import schema_directive
|
17
|
+
from .types.info import Info
|
17
18
|
from .union import union
|
18
19
|
from .unset import UNSET
|
19
20
|
|
@@ -21,6 +22,7 @@ __all__ = [
|
|
21
22
|
"BasePermission",
|
22
23
|
"experimental",
|
23
24
|
"ID",
|
25
|
+
"Info",
|
24
26
|
"UNSET",
|
25
27
|
"lazy",
|
26
28
|
"LazyType",
|
@@ -2,9 +2,6 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
import dataclasses
|
4
4
|
import keyword
|
5
|
-
from collections import defaultdict
|
6
|
-
from typing import TYPE_CHECKING, Tuple
|
7
|
-
from typing_extensions import Protocol
|
8
5
|
|
9
6
|
import libcst as cst
|
10
7
|
from graphql import (
|
@@ -22,7 +19,6 @@ from graphql import (
|
|
22
19
|
OperationType,
|
23
20
|
ScalarTypeDefinitionNode,
|
24
21
|
SchemaDefinitionNode,
|
25
|
-
SchemaExtensionNode,
|
26
22
|
StringValueNode,
|
27
23
|
TypeNode,
|
28
24
|
UnionTypeDefinitionNode,
|
@@ -31,14 +27,6 @@ from graphql import (
|
|
31
27
|
|
32
28
|
from strawberry.utils.str_converters import to_snake_case
|
33
29
|
|
34
|
-
if TYPE_CHECKING:
|
35
|
-
from graphql.language.ast import ConstDirectiveNode
|
36
|
-
|
37
|
-
|
38
|
-
class HasDirectives(Protocol):
|
39
|
-
directives: Tuple[ConstDirectiveNode]
|
40
|
-
|
41
|
-
|
42
30
|
_SCALAR_MAP = {
|
43
31
|
"Int": cst.Name("int"),
|
44
32
|
"Float": cst.Name("float"),
|
@@ -60,19 +48,6 @@ _SCALAR_MAP = {
|
|
60
48
|
}
|
61
49
|
|
62
50
|
|
63
|
-
def _is_federation_link_directive(directive: ConstDirectiveNode) -> bool:
|
64
|
-
if directive.name.value != "link":
|
65
|
-
return False
|
66
|
-
|
67
|
-
for argument in directive.arguments:
|
68
|
-
if argument.name.value == "url":
|
69
|
-
return argument.value.value.startswith(
|
70
|
-
"https://specs.apollo.dev/federation"
|
71
|
-
)
|
72
|
-
|
73
|
-
return False
|
74
|
-
|
75
|
-
|
76
51
|
def _get_field_type(
|
77
52
|
field_type: TypeNode, was_non_nullable: bool = False
|
78
53
|
) -> cst.BaseExpression:
|
@@ -110,10 +85,7 @@ def _get_field_type(
|
|
110
85
|
)
|
111
86
|
|
112
87
|
|
113
|
-
def
|
114
|
-
if isinstance(value, bool):
|
115
|
-
return cst.Name(value=str(value))
|
116
|
-
|
88
|
+
def _get_argument(name: str, value: str) -> cst.Arg:
|
117
89
|
if "\n" in value:
|
118
90
|
argument_value = cst.SimpleString(f'"""\n{value}\n"""')
|
119
91
|
elif '"' in value:
|
@@ -121,12 +93,6 @@ def _sanitize_argument(value: str | bool) -> cst.SimpleString | cst.Name:
|
|
121
93
|
else:
|
122
94
|
argument_value = cst.SimpleString(f'"{value}"')
|
123
95
|
|
124
|
-
return argument_value
|
125
|
-
|
126
|
-
|
127
|
-
def _get_argument(name: str, value: str | bool) -> cst.Arg:
|
128
|
-
argument_value = _sanitize_argument(value)
|
129
|
-
|
130
96
|
return cst.Arg(
|
131
97
|
value=argument_value,
|
132
98
|
keyword=cst.Name(name),
|
@@ -134,25 +100,7 @@ def _get_argument(name: str, value: str | bool) -> cst.Arg:
|
|
134
100
|
)
|
135
101
|
|
136
102
|
|
137
|
-
def
|
138
|
-
value = cst.List(
|
139
|
-
elements=[cst.Element(value=_sanitize_argument(value)) for value in values],
|
140
|
-
)
|
141
|
-
|
142
|
-
return cst.Arg(
|
143
|
-
value=value,
|
144
|
-
keyword=cst.Name(name),
|
145
|
-
equal=cst.AssignEqual(cst.SimpleWhitespace(""), cst.SimpleWhitespace("")),
|
146
|
-
)
|
147
|
-
|
148
|
-
|
149
|
-
def _get_field_value(
|
150
|
-
field: FieldDefinitionNode | InputValueDefinitionNode,
|
151
|
-
alias: str | None,
|
152
|
-
is_apollo_federation: bool,
|
153
|
-
) -> cst.Call | None:
|
154
|
-
description = field.description.value if field.description else None
|
155
|
-
|
103
|
+
def _get_field_value(description: str | None, alias: str | None) -> cst.Call | None:
|
156
104
|
args = list(
|
157
105
|
filter(
|
158
106
|
None,
|
@@ -163,24 +111,6 @@ def _get_field_value(
|
|
163
111
|
)
|
164
112
|
)
|
165
113
|
|
166
|
-
directives = _get_directives(field)
|
167
|
-
|
168
|
-
apollo_federation_args = _get_federation_arguments(directives)
|
169
|
-
|
170
|
-
if is_apollo_federation and apollo_federation_args:
|
171
|
-
args.extend(apollo_federation_args)
|
172
|
-
|
173
|
-
return cst.Call(
|
174
|
-
func=cst.Attribute(
|
175
|
-
value=cst.Attribute(
|
176
|
-
value=cst.Name("strawberry"),
|
177
|
-
attr=cst.Name("federation"),
|
178
|
-
),
|
179
|
-
attr=cst.Name("field"),
|
180
|
-
),
|
181
|
-
args=args,
|
182
|
-
)
|
183
|
-
|
184
114
|
if args:
|
185
115
|
return cst.Call(
|
186
116
|
func=cst.Attribute(
|
@@ -195,7 +125,6 @@ def _get_field_value(
|
|
195
125
|
|
196
126
|
def _get_field(
|
197
127
|
field: FieldDefinitionNode | InputValueDefinitionNode,
|
198
|
-
is_apollo_federation: bool,
|
199
128
|
) -> cst.SimpleStatementLine:
|
200
129
|
name = to_snake_case(field.name.value)
|
201
130
|
alias: str | None = None
|
@@ -212,67 +141,19 @@ def _get_field(
|
|
212
141
|
_get_field_type(field.type),
|
213
142
|
),
|
214
143
|
value=_get_field_value(
|
215
|
-
field
|
144
|
+
description=field.description.value if field.description else None,
|
145
|
+
alias=alias if alias != name else None,
|
216
146
|
),
|
217
147
|
)
|
218
148
|
]
|
219
149
|
)
|
220
150
|
|
221
151
|
|
222
|
-
def _get_directives(definition: HasDirectives) -> dict[str, list[dict[str, str]]]:
|
223
|
-
directives = defaultdict(list)
|
224
|
-
|
225
|
-
for directive in definition.directives:
|
226
|
-
directive_name = directive.name.value
|
227
|
-
|
228
|
-
directives[directive_name].append(
|
229
|
-
{
|
230
|
-
argument.name.value: argument.value.value
|
231
|
-
for argument in directive.arguments
|
232
|
-
}
|
233
|
-
)
|
234
|
-
|
235
|
-
return directives
|
236
|
-
|
237
|
-
|
238
|
-
def _get_federation_arguments(
|
239
|
-
directives: dict[str, list[dict[str, str]]],
|
240
|
-
) -> list[cst.Arg]:
|
241
|
-
def append_arg_from_directive(
|
242
|
-
directive: str, argument_name: str, keyword_name: str | None = None
|
243
|
-
):
|
244
|
-
keyword_name = keyword_name or directive
|
245
|
-
|
246
|
-
if directive in directives:
|
247
|
-
arguments.append(
|
248
|
-
_get_argument_list(
|
249
|
-
keyword_name,
|
250
|
-
[item[argument_name] for item in directives[directive]],
|
251
|
-
)
|
252
|
-
)
|
253
|
-
|
254
|
-
arguments: list[cst.Arg] = []
|
255
|
-
|
256
|
-
append_arg_from_directive("key", "fields", "keys")
|
257
|
-
append_arg_from_directive("requires", "fields")
|
258
|
-
append_arg_from_directive("provides", "fields")
|
259
|
-
append_arg_from_directive("tag", "name", "tags")
|
260
|
-
|
261
|
-
boolean_keys = ("shareable", "inaccessible", "external", "override")
|
262
|
-
|
263
|
-
arguments.extend(
|
264
|
-
_get_argument(key, True) for key in boolean_keys if directives.get(key, False)
|
265
|
-
)
|
266
|
-
|
267
|
-
return arguments
|
268
|
-
|
269
|
-
|
270
152
|
def _get_strawberry_decorator(
|
271
153
|
definition: ObjectTypeDefinitionNode
|
272
154
|
| ObjectTypeExtensionNode
|
273
155
|
| InterfaceTypeDefinitionNode
|
274
156
|
| InputObjectTypeDefinitionNode,
|
275
|
-
is_apollo_federation: bool,
|
276
157
|
) -> cst.Decorator:
|
277
158
|
type_ = {
|
278
159
|
ObjectTypeDefinitionNode: "type",
|
@@ -287,36 +168,15 @@ def _get_strawberry_decorator(
|
|
287
168
|
else None
|
288
169
|
)
|
289
170
|
|
290
|
-
directives = _get_directives(definition)
|
291
|
-
|
292
171
|
decorator: cst.BaseExpression = cst.Attribute(
|
293
172
|
value=cst.Name("strawberry"),
|
294
173
|
attr=cst.Name(type_),
|
295
174
|
)
|
296
175
|
|
297
|
-
arguments: list[cst.Arg] = []
|
298
|
-
|
299
176
|
if description is not None:
|
300
|
-
arguments.append(_get_argument("description", description.value))
|
301
|
-
|
302
|
-
federation_arguments = _get_federation_arguments(directives)
|
303
|
-
|
304
|
-
# and has any directive that is a federation directive
|
305
|
-
if is_apollo_federation and federation_arguments:
|
306
|
-
decorator = cst.Attribute(
|
307
|
-
value=cst.Attribute(
|
308
|
-
value=cst.Name("strawberry"),
|
309
|
-
attr=cst.Name("federation"),
|
310
|
-
),
|
311
|
-
attr=cst.Name(type_),
|
312
|
-
)
|
313
|
-
|
314
|
-
arguments.extend(federation_arguments)
|
315
|
-
|
316
|
-
if arguments:
|
317
177
|
decorator = cst.Call(
|
318
178
|
func=decorator,
|
319
|
-
args=
|
179
|
+
args=[_get_argument("description", description.value)],
|
320
180
|
)
|
321
181
|
|
322
182
|
return cst.Decorator(
|
@@ -329,9 +189,8 @@ def _get_class_definition(
|
|
329
189
|
| ObjectTypeExtensionNode
|
330
190
|
| InterfaceTypeDefinitionNode
|
331
191
|
| InputObjectTypeDefinitionNode,
|
332
|
-
is_apollo_federation: bool,
|
333
192
|
) -> cst.ClassDef:
|
334
|
-
decorator = _get_strawberry_decorator(definition
|
193
|
+
decorator = _get_strawberry_decorator(definition)
|
335
194
|
|
336
195
|
bases = (
|
337
196
|
[cst.Arg(cst.Name(interface.name.value)) for interface in definition.interfaces]
|
@@ -345,11 +204,7 @@ def _get_class_definition(
|
|
345
204
|
return cst.ClassDef(
|
346
205
|
name=cst.Name(definition.name.value),
|
347
206
|
bases=bases,
|
348
|
-
body=cst.IndentedBlock(
|
349
|
-
body=[
|
350
|
-
_get_field(field, is_apollo_federation) for field in definition.fields
|
351
|
-
]
|
352
|
-
),
|
207
|
+
body=cst.IndentedBlock(body=[_get_field(field) for field in definition.fields]),
|
353
208
|
decorators=[decorator],
|
354
209
|
)
|
355
210
|
|
@@ -388,7 +243,6 @@ def _get_schema_definition(
|
|
388
243
|
root_query_name: str | None,
|
389
244
|
root_mutation_name: str | None,
|
390
245
|
root_subscription_name: str | None,
|
391
|
-
is_apollo_federation: bool,
|
392
246
|
) -> cst.SimpleStatementLine | None:
|
393
247
|
if not any([root_query_name, root_mutation_name, root_subscription_name]):
|
394
248
|
return None
|
@@ -411,40 +265,17 @@ def _get_schema_definition(
|
|
411
265
|
if root_subscription_name:
|
412
266
|
args.append(_get_arg("subscription", root_subscription_name))
|
413
267
|
|
414
|
-
schema_call = cst.Call(
|
415
|
-
func=cst.Attribute(
|
416
|
-
value=cst.Name("strawberry"),
|
417
|
-
attr=cst.Name("Schema"),
|
418
|
-
),
|
419
|
-
args=args,
|
420
|
-
)
|
421
|
-
|
422
|
-
if is_apollo_federation:
|
423
|
-
args.append(
|
424
|
-
cst.Arg(
|
425
|
-
keyword=cst.Name("enable_federation_2"),
|
426
|
-
value=cst.Name("True"),
|
427
|
-
equal=cst.AssignEqual(
|
428
|
-
cst.SimpleWhitespace(""), cst.SimpleWhitespace("")
|
429
|
-
),
|
430
|
-
)
|
431
|
-
)
|
432
|
-
schema_call = cst.Call(
|
433
|
-
func=cst.Attribute(
|
434
|
-
value=cst.Attribute(
|
435
|
-
value=cst.Name(value="strawberry"),
|
436
|
-
attr=cst.Name(value="federation"),
|
437
|
-
),
|
438
|
-
attr=cst.Name(value="Schema"),
|
439
|
-
),
|
440
|
-
args=args,
|
441
|
-
)
|
442
|
-
|
443
268
|
return cst.SimpleStatementLine(
|
444
269
|
body=[
|
445
270
|
cst.Assign(
|
446
271
|
targets=[cst.AssignTarget(cst.Name("schema"))],
|
447
|
-
value=
|
272
|
+
value=cst.Call(
|
273
|
+
func=cst.Attribute(
|
274
|
+
value=cst.Name("strawberry"),
|
275
|
+
attr=cst.Name("Schema"),
|
276
|
+
),
|
277
|
+
args=args,
|
278
|
+
),
|
448
279
|
)
|
449
280
|
]
|
450
281
|
)
|
@@ -599,12 +430,6 @@ def codegen(schema: str) -> str:
|
|
599
430
|
|
600
431
|
object_types: dict[str, cst.ClassDef] = {}
|
601
432
|
|
602
|
-
# when we encounter a extend schema @link ..., we check if is an apollo federation schema
|
603
|
-
# and we use this variable to keep track of it, but at the moment the assumption is that
|
604
|
-
# the schema extension is always done at the top, this might not be the case all the
|
605
|
-
# time
|
606
|
-
is_apollo_federation = False
|
607
|
-
|
608
433
|
for definition in document.definitions:
|
609
434
|
if isinstance(
|
610
435
|
definition,
|
@@ -615,7 +440,7 @@ def codegen(schema: str) -> str:
|
|
615
440
|
ObjectTypeExtensionNode,
|
616
441
|
),
|
617
442
|
):
|
618
|
-
class_definition = _get_class_definition(definition
|
443
|
+
class_definition = _get_class_definition(definition)
|
619
444
|
|
620
445
|
object_types[definition.name.value] = class_definition
|
621
446
|
|
@@ -653,11 +478,6 @@ def codegen(schema: str) -> str:
|
|
653
478
|
definitions.append(cst.EmptyLine())
|
654
479
|
definitions.append(scalar_definition)
|
655
480
|
definitions.append(cst.EmptyLine())
|
656
|
-
elif isinstance(definition, SchemaExtensionNode):
|
657
|
-
is_apollo_federation = any(
|
658
|
-
_is_federation_link_directive(directive)
|
659
|
-
for directive in definition.directives
|
660
|
-
)
|
661
481
|
else:
|
662
482
|
raise NotImplementedError(f"Unknown definition {definition}")
|
663
483
|
|
@@ -676,7 +496,6 @@ def codegen(schema: str) -> str:
|
|
676
496
|
root_query_name=root_query_name,
|
677
497
|
root_mutation_name=root_mutation_name,
|
678
498
|
root_subscription_name=root_subscription_name,
|
679
|
-
is_apollo_federation=is_apollo_federation,
|
680
499
|
)
|
681
500
|
|
682
501
|
if schema_definition:
|
@@ -155,7 +155,7 @@ class ReservedType(NamedTuple):
|
|
155
155
|
# Handle annotated arguments such as Private[str] and DirectiveValue[str]
|
156
156
|
return type_has_annotation(other, self.type)
|
157
157
|
else:
|
158
|
-
# Handle both concrete and generic types (i.e Info, and Info
|
158
|
+
# Handle both concrete and generic types (i.e Info, and Info)
|
159
159
|
return (
|
160
160
|
issubclass(origin, self.type)
|
161
161
|
if isinstance(origin, type)
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/types/info.py
RENAMED
@@ -10,10 +10,11 @@ from typing import (
|
|
10
10
|
Generic,
|
11
11
|
List,
|
12
12
|
Optional,
|
13
|
+
Tuple,
|
13
14
|
Type,
|
14
|
-
TypeVar,
|
15
15
|
Union,
|
16
16
|
)
|
17
|
+
from typing_extensions import TypeVar
|
17
18
|
|
18
19
|
from .nodes import convert_selections
|
19
20
|
|
@@ -29,8 +30,8 @@ if TYPE_CHECKING:
|
|
29
30
|
|
30
31
|
from .nodes import Selection
|
31
32
|
|
32
|
-
ContextType = TypeVar("ContextType")
|
33
|
-
RootValueType = TypeVar("RootValueType")
|
33
|
+
ContextType = TypeVar("ContextType", default=Any)
|
34
|
+
RootValueType = TypeVar("RootValueType", default=Any)
|
34
35
|
|
35
36
|
|
36
37
|
@dataclasses.dataclass
|
@@ -38,6 +39,21 @@ class Info(Generic[ContextType, RootValueType]):
|
|
38
39
|
_raw_info: GraphQLResolveInfo
|
39
40
|
_field: StrawberryField
|
40
41
|
|
42
|
+
def __class_getitem__(cls, types: Union[type, Tuple[type, ...]]) -> Type[Info]:
|
43
|
+
"""Workaround for when passing only one type.
|
44
|
+
|
45
|
+
Python doesn't yet support directly passing only one type to a generic class
|
46
|
+
that has typevars with defaults. This is a workaround for that.
|
47
|
+
|
48
|
+
See:
|
49
|
+
https://discuss.python.org/t/passing-only-one-typevar-of-two-when-using-defaults/49134
|
50
|
+
"""
|
51
|
+
|
52
|
+
if not isinstance(types, tuple):
|
53
|
+
types = (types, Any) # type: ignore
|
54
|
+
|
55
|
+
return super().__class_getitem__(types) # type: ignore
|
56
|
+
|
41
57
|
@property
|
42
58
|
def field_name(self) -> str:
|
43
59
|
return self._raw_info.field_name
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/__main__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/aiohttp/views.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/annotation.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/arguments.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/asgi/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/chalice/views.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/app.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/cli/constants.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/codegen/types.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/custom_scalar.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/dataloader.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/directive.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/apps.py
RENAMED
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/context.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.221.0.dev1710955937 → strawberry_graphql-0.221.1}/strawberry/django/views.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|