strawberry-graphql 0.267.0__tar.gz → 0.268.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/PKG-INFO +1 -1
- strawberry_graphql-0.268.0/pyproject.toml +403 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/scalars.py +3 -1
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/compat.py +2 -1
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/config.py +1 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/schema.py +6 -13
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/schema_converter.py +49 -7
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/types/scalar.py +2 -16
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/arguments.py +2 -2
- strawberry_graphql-0.267.0/pyproject.toml +0 -398
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/LICENSE +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/README.md +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/handlers/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/codemods/update_imports.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/missing_dependencies.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/async_base_view.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/parse_content_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/validation_rules/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/validation_rules/one_of.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema_codegen/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema_directives.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/auto.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/base.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/cast.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/enum.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/field.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/lazy_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/maybe.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/mutation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/object_type.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/private.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/scalar.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/union.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/types/unset.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/utils/typing.py +0 -0
@@ -0,0 +1,403 @@
|
|
1
|
+
[tool.poetry]
|
2
|
+
name = "strawberry-graphql"
|
3
|
+
version = "0.268.0"
|
4
|
+
packages = [{ include = "strawberry" }]
|
5
|
+
description = "A library for creating GraphQL APIs"
|
6
|
+
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
|
+
license = "MIT"
|
8
|
+
readme = "README.md"
|
9
|
+
keywords = ["graphql", "api", "rest", "starlette", "async"]
|
10
|
+
homepage = "https://strawberry.rocks/"
|
11
|
+
repository = "https://github.com/strawberry-graphql/strawberry"
|
12
|
+
documentation = "https://strawberry.rocks/"
|
13
|
+
classifiers = [
|
14
|
+
"Development Status :: 5 - Production/Stable",
|
15
|
+
"Intended Audience :: Developers",
|
16
|
+
"Topic :: Software Development :: Libraries",
|
17
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
18
|
+
"License :: OSI Approved :: MIT License",
|
19
|
+
]
|
20
|
+
include = ["strawberry/py.typed"]
|
21
|
+
|
22
|
+
[tool.poetry.urls]
|
23
|
+
"Changelog" = "https://strawberry.rocks/changelog"
|
24
|
+
"Discord" = "https://discord.com/invite/3uQ2PaY"
|
25
|
+
"Twitter" = "https://twitter.com/strawberry_gql"
|
26
|
+
"Mastodon" = "https://farbun.social/@strawberry"
|
27
|
+
"Sponsor on GitHub" = "https://github.com/sponsors/strawberry-graphql"
|
28
|
+
"Sponsor on Open Collective" = "https://opencollective.com/strawberry-graphql"
|
29
|
+
|
30
|
+
[tool.poetry.dependencies]
|
31
|
+
python = ">=3.9"
|
32
|
+
graphql-core = { version = ">=3.2.0,<3.4.0", python = ">=3.9,<4.0" }
|
33
|
+
typing-extensions = ">=4.5.0"
|
34
|
+
python-dateutil = "^2.7.0"
|
35
|
+
packaging = ">=23"
|
36
|
+
starlette = { version = ">=0.18.0", optional = true }
|
37
|
+
typer = { version = ">=0.7.0", optional = true }
|
38
|
+
pygments = { version = "^2.3", optional = true }
|
39
|
+
uvicorn = { version = ">=0.11.6", optional = true }
|
40
|
+
Django = { version = ">=3.2", optional = true }
|
41
|
+
asgiref = { version = "^3.2", optional = true }
|
42
|
+
flask = { version = ">=1.1", optional = true }
|
43
|
+
quart = { version = ">=0.19.3", optional = true }
|
44
|
+
opentelemetry-api = { version = "<2", optional = true }
|
45
|
+
opentelemetry-sdk = { version = "<2", optional = true }
|
46
|
+
chalice = { version = "^1.22", optional = true }
|
47
|
+
pydantic = { version = ">1.6.1", optional = true }
|
48
|
+
python-multipart = { version = ">=0.0.7", optional = true }
|
49
|
+
sanic = { version = ">=20.12.2", optional = true }
|
50
|
+
aiohttp = { version = "^3.7.4.post0", optional = true }
|
51
|
+
fastapi = { version = ">=0.65.2", optional = true }
|
52
|
+
litestar = { version = ">=2", python = ">=3.10,<4.0", optional = true }
|
53
|
+
channels = { version = ">=3.0.5", optional = true }
|
54
|
+
libcst = { version = ">=0.4.7", optional = true }
|
55
|
+
rich = { version = ">=12.0.0", optional = true }
|
56
|
+
pyinstrument = { version = ">=4.0.0", optional = true }
|
57
|
+
|
58
|
+
[tool.poetry.group.dev.dependencies]
|
59
|
+
ruff = "^0.11.4"
|
60
|
+
asgiref = "^3.2"
|
61
|
+
email-validator = { version = ">=1.1.3,<3.0.0", optional = false }
|
62
|
+
freezegun = "^1.2.1"
|
63
|
+
libcst = { version = ">=1.0.0", optional = false }
|
64
|
+
MarkupSafe = "2.1.3"
|
65
|
+
nox = "^2024.4.15"
|
66
|
+
nox-poetry = "^1.0.3"
|
67
|
+
opentelemetry-api = "<2"
|
68
|
+
opentelemetry-sdk = "<2"
|
69
|
+
pygments = "^2.3"
|
70
|
+
pyinstrument = { version = ">=4.0.0", optional = false }
|
71
|
+
pytest = "^7.2"
|
72
|
+
pytest-asyncio = ">=0.20.3"
|
73
|
+
pytest-codspeed = { version = ">=3.0.0", python = ">=3.9" }
|
74
|
+
pytest-cov = "^4.0.0"
|
75
|
+
pytest-emoji = "^0.2.0"
|
76
|
+
pytest-mock = "^3.10"
|
77
|
+
pytest-snapshot = "^0.9.0"
|
78
|
+
pytest-xdist = { extras = ["psutil"], version = "^3.1.0" }
|
79
|
+
python-multipart = ">=0.0.7"
|
80
|
+
rich = { version = ">=12.5.1", optional = false }
|
81
|
+
sanic-testing = ">=22.9,<24.0"
|
82
|
+
typer = { version = ">=0.7.0", optional = false }
|
83
|
+
types-aiofiles = "^24.1.0.20250326"
|
84
|
+
types-certifi = "^2021.10.8"
|
85
|
+
types-chardet = "^5.0.4"
|
86
|
+
types-freezegun = "^1.1.9"
|
87
|
+
types-python-dateutil = "^2.8.19"
|
88
|
+
types-toml = "^0.10.8"
|
89
|
+
types-typed-ast = "^1.5.8"
|
90
|
+
types-ujson = "^5.10.0.20250326"
|
91
|
+
types-protobuf = "^5.29.1.20250403"
|
92
|
+
poetry-plugin-export = { version = "^1.6.0", python = "<4.0", optional = false }
|
93
|
+
# another bug in poetry
|
94
|
+
urllib3 = "<2"
|
95
|
+
graphlib_backport = { version = "*", python = "<3.9", optional = false }
|
96
|
+
inline-snapshot = "^0.10.1"
|
97
|
+
types-deprecated = "^1.2.15.20241117"
|
98
|
+
types-six = "^1.17.0.20250403"
|
99
|
+
types-pyyaml = "^6.0.12.20240917"
|
100
|
+
mypy = "^1.15.0"
|
101
|
+
codeflash = ">=0.9.2"
|
102
|
+
|
103
|
+
[tool.poetry.group.integrations]
|
104
|
+
optional = true
|
105
|
+
|
106
|
+
[tool.poetry.group.integrations.dependencies]
|
107
|
+
aiohttp = "^3.7.4.post0"
|
108
|
+
chalice = { version = "^1.22" }
|
109
|
+
channels = ">=3.0.5,<5.0.0"
|
110
|
+
Django = ">=3.2"
|
111
|
+
fastapi = { version = ">=0.65.0", optional = false }
|
112
|
+
flask = ">=1.1"
|
113
|
+
quart = ">=0.19.3"
|
114
|
+
pydantic = { version = ">=2.0", optional = false }
|
115
|
+
pytest-aiohttp = "^1.0.3"
|
116
|
+
pytest-django = { version = "^4.5" }
|
117
|
+
sanic = ">=20.12.2"
|
118
|
+
starlette = ">=0.13.6"
|
119
|
+
litestar = { version = ">=2", python = ">=3.10,<4.0", optional = false }
|
120
|
+
uvicorn = ">=0.11.6"
|
121
|
+
daphne = "^4.0.0"
|
122
|
+
|
123
|
+
|
124
|
+
[tool.poetry.extras]
|
125
|
+
aiohttp = ["aiohttp"]
|
126
|
+
asgi = ["starlette", "python-multipart"]
|
127
|
+
debug = ["rich", "libcst"]
|
128
|
+
debug-server = [
|
129
|
+
"starlette",
|
130
|
+
"uvicorn",
|
131
|
+
"python-multipart",
|
132
|
+
"typer",
|
133
|
+
"pygments",
|
134
|
+
"rich",
|
135
|
+
"libcst",
|
136
|
+
]
|
137
|
+
django = ["Django", "pytest-django", "asgiref"]
|
138
|
+
channels = ["channels", "asgiref"]
|
139
|
+
flask = ["flask"]
|
140
|
+
quart = ["quart"]
|
141
|
+
opentelemetry = ["opentelemetry-api", "opentelemetry-sdk"]
|
142
|
+
pydantic = ["pydantic"]
|
143
|
+
sanic = ["sanic"]
|
144
|
+
fastapi = ["fastapi", "python-multipart"]
|
145
|
+
chalice = ["chalice"]
|
146
|
+
cli = ["typer", "pygments", "rich", "libcst", "graphlib_backport"]
|
147
|
+
litestar = ["litestar"]
|
148
|
+
pyinstrument = ["pyinstrument"]
|
149
|
+
|
150
|
+
[tool.poetry.scripts]
|
151
|
+
strawberry = "strawberry.cli:run"
|
152
|
+
|
153
|
+
|
154
|
+
[tool.pytest.ini_options]
|
155
|
+
addopts = "--emoji"
|
156
|
+
DJANGO_SETTINGS_MODULE = "tests.django.django_settings"
|
157
|
+
testpaths = ["tests/"]
|
158
|
+
markers = [
|
159
|
+
"aiohttp",
|
160
|
+
"asgi",
|
161
|
+
"chalice",
|
162
|
+
"channels",
|
163
|
+
"django_db",
|
164
|
+
"django",
|
165
|
+
"fastapi",
|
166
|
+
"flaky",
|
167
|
+
"flask",
|
168
|
+
"litestar",
|
169
|
+
"pydantic",
|
170
|
+
"quart",
|
171
|
+
"relay",
|
172
|
+
"sanic",
|
173
|
+
"starlette",
|
174
|
+
]
|
175
|
+
asyncio_mode = "auto"
|
176
|
+
filterwarnings = [
|
177
|
+
"ignore::DeprecationWarning:strawberry.*.resolver",
|
178
|
+
"ignore:LazyType is deprecated:DeprecationWarning",
|
179
|
+
"ignore::DeprecationWarning:ddtrace.internal",
|
180
|
+
"ignore::DeprecationWarning:django.utils.encoding",
|
181
|
+
# ignoring the text instead of the whole warning because we'd
|
182
|
+
# get an error when django is not installed
|
183
|
+
"ignore:The default value of USE_TZ",
|
184
|
+
"ignore::DeprecationWarning:pydantic_openapi_schema.*",
|
185
|
+
"ignore::DeprecationWarning:graphql.*",
|
186
|
+
"ignore::DeprecationWarning:websockets.*",
|
187
|
+
"ignore::DeprecationWarning:pydantic.*",
|
188
|
+
"ignore::UserWarning:pydantic.*",
|
189
|
+
"ignore::DeprecationWarning:pkg_resources.*",
|
190
|
+
]
|
191
|
+
|
192
|
+
|
193
|
+
[tool.autopub]
|
194
|
+
git-username = "Botberry"
|
195
|
+
git-email = "bot@strawberry.rocks"
|
196
|
+
project-name = "🍓"
|
197
|
+
append-github-contributor = true
|
198
|
+
|
199
|
+
[tool.pyright]
|
200
|
+
# include = ["strawberry"]
|
201
|
+
exclude = ["**/__pycache__", "**/.venv", "**/.pytest_cache", "**/.nox"]
|
202
|
+
reportMissingImports = true
|
203
|
+
reportMissingTypeStubs = false
|
204
|
+
pythonVersion = "3.9"
|
205
|
+
stubPath = ""
|
206
|
+
|
207
|
+
[tool.ruff]
|
208
|
+
line-length = 88
|
209
|
+
target-version = "py39"
|
210
|
+
fix = true
|
211
|
+
exclude = [
|
212
|
+
".bzr",
|
213
|
+
".direnv",
|
214
|
+
".eggs",
|
215
|
+
".git",
|
216
|
+
".hg",
|
217
|
+
".mypy_cache",
|
218
|
+
".nox",
|
219
|
+
".pants.d",
|
220
|
+
".ruff_cache",
|
221
|
+
".svn",
|
222
|
+
".tox",
|
223
|
+
".venv",
|
224
|
+
"__pypackages__",
|
225
|
+
"_build",
|
226
|
+
"buck-out",
|
227
|
+
"build",
|
228
|
+
"dist",
|
229
|
+
"node_modules",
|
230
|
+
"venv",
|
231
|
+
"tests/*/snapshots",
|
232
|
+
]
|
233
|
+
src = ["strawberry", "tests"]
|
234
|
+
|
235
|
+
[tool.ruff.lint]
|
236
|
+
select = ["ALL"]
|
237
|
+
ignore = [
|
238
|
+
# https://github.com/astral-sh/ruff/pull/4427
|
239
|
+
# equivalent to keep-runtime-typing. We might want to enable those
|
240
|
+
# after we drop support for Python 3.9
|
241
|
+
"UP006",
|
242
|
+
"UP007",
|
243
|
+
|
244
|
+
# we use asserts in tests and to hint mypy
|
245
|
+
"S101",
|
246
|
+
|
247
|
+
# Allow "Any" for annotations. We have too many Any annotations and some
|
248
|
+
# are legit. Maybe reconsider in the future, except for tests?
|
249
|
+
"ANN401",
|
250
|
+
|
251
|
+
# Allow our exceptions to have names that don't end in "Error". Maybe refactor
|
252
|
+
# in the future? But that would be a breaking change.
|
253
|
+
"N818",
|
254
|
+
|
255
|
+
# Allow "type: ignore" without rule code. Because we support both mypy and
|
256
|
+
# pyright, and they have different codes for the same error, we can't properly
|
257
|
+
# fix those issues.
|
258
|
+
"PGH003",
|
259
|
+
|
260
|
+
# Variable `T` in function should be lowercase
|
261
|
+
# this seems a potential bug or opportunity for improvement in ruff
|
262
|
+
"N806",
|
263
|
+
|
264
|
+
# shadowing builtins
|
265
|
+
"A001",
|
266
|
+
"A002",
|
267
|
+
"A003",
|
268
|
+
"A005",
|
269
|
+
|
270
|
+
# Unused arguments
|
271
|
+
"ARG001",
|
272
|
+
"ARG002",
|
273
|
+
"ARG003",
|
274
|
+
"ARG004",
|
275
|
+
"ARG005",
|
276
|
+
|
277
|
+
# Boolean positional arguments
|
278
|
+
"FBT001",
|
279
|
+
"FBT002",
|
280
|
+
"FBT003",
|
281
|
+
|
282
|
+
# Too many arguments/branches/return statements
|
283
|
+
"PLR0913",
|
284
|
+
"PLR0912",
|
285
|
+
"PLR0911",
|
286
|
+
|
287
|
+
# Do not force adding _co to covariant typevars
|
288
|
+
"PLC0105",
|
289
|
+
|
290
|
+
# Allow private access to attributes
|
291
|
+
"SLF001",
|
292
|
+
|
293
|
+
# code complexity
|
294
|
+
"C901",
|
295
|
+
|
296
|
+
# Allow todo/fixme/etc comments
|
297
|
+
"TD002",
|
298
|
+
"TD003",
|
299
|
+
"FIX001",
|
300
|
+
"FIX002",
|
301
|
+
|
302
|
+
# We don't want to add "from __future__ mport annotations" everywhere
|
303
|
+
"FA100",
|
304
|
+
|
305
|
+
# Docstrings, maybe to enable later
|
306
|
+
"D100",
|
307
|
+
"D101",
|
308
|
+
"D102",
|
309
|
+
"D103",
|
310
|
+
"D104",
|
311
|
+
"D105",
|
312
|
+
"D106",
|
313
|
+
"D107",
|
314
|
+
"D412",
|
315
|
+
|
316
|
+
# Allow to define exceptions text in the exception body
|
317
|
+
"TRY003",
|
318
|
+
"EM101",
|
319
|
+
"EM102",
|
320
|
+
"EM103",
|
321
|
+
|
322
|
+
# Allow comparisons with magic numbers
|
323
|
+
"PLR2004",
|
324
|
+
|
325
|
+
# Allow methods to use lru_cache
|
326
|
+
"B019",
|
327
|
+
|
328
|
+
# Don't force if branches to be converted to "or"
|
329
|
+
"SIM114",
|
330
|
+
|
331
|
+
# ruff formatter recommends to disable those, as they conflict with it
|
332
|
+
# we don't need to ever enable those.
|
333
|
+
"COM812",
|
334
|
+
"COM819",
|
335
|
+
"D206",
|
336
|
+
"E111",
|
337
|
+
"E114",
|
338
|
+
"E117",
|
339
|
+
"E501",
|
340
|
+
"ISC001",
|
341
|
+
"Q000",
|
342
|
+
"Q001",
|
343
|
+
"Q002",
|
344
|
+
"Q003",
|
345
|
+
"W191",
|
346
|
+
]
|
347
|
+
|
348
|
+
[tool.ruff.lint.per-file-ignores]
|
349
|
+
".github/*" = ["INP001"]
|
350
|
+
"federation-compatibility/*" = ["INP001"]
|
351
|
+
"strawberry/cli/*" = ["B008"]
|
352
|
+
"strawberry/extensions/tracing/__init__.py" = ["TCH004"]
|
353
|
+
"strawberry/fastapi/*" = ["B008"]
|
354
|
+
"strawberry/annotation.py" = ["RET505"]
|
355
|
+
"tests/*" = [
|
356
|
+
"ANN001",
|
357
|
+
"ANN201",
|
358
|
+
"ANN202",
|
359
|
+
"ANN204",
|
360
|
+
"B008",
|
361
|
+
"B018",
|
362
|
+
"D",
|
363
|
+
"DTZ001",
|
364
|
+
"DTZ005",
|
365
|
+
"FA102",
|
366
|
+
"N805",
|
367
|
+
"PLC1901",
|
368
|
+
"PLR2004",
|
369
|
+
"PLW0603",
|
370
|
+
"PT011",
|
371
|
+
"RUF012",
|
372
|
+
"S105",
|
373
|
+
"S106",
|
374
|
+
"S603",
|
375
|
+
"S607",
|
376
|
+
"TCH001",
|
377
|
+
"TCH002",
|
378
|
+
"TCH003",
|
379
|
+
"TRY002",
|
380
|
+
]
|
381
|
+
|
382
|
+
[tool.ruff.lint.isort]
|
383
|
+
known-first-party = ["strawberry"]
|
384
|
+
known-third-party = ["django", "graphql"]
|
385
|
+
extra-standard-library = ["typing_extensions"]
|
386
|
+
|
387
|
+
[tool.ruff.format]
|
388
|
+
exclude = ['tests/codegen/snapshots/', 'tests/cli/snapshots/']
|
389
|
+
|
390
|
+
[tool.ruff.lint.pydocstyle]
|
391
|
+
convention = "google"
|
392
|
+
|
393
|
+
[tool.codeflash]
|
394
|
+
# All paths are relative to this pyproject.toml's directory.
|
395
|
+
module-root = "strawberry"
|
396
|
+
tests-root = "tests"
|
397
|
+
test-framework = "pytest"
|
398
|
+
ignore-paths = []
|
399
|
+
formatter-cmds = ["ruff check --exit-zero --fix $file", "ruff format $file"]
|
400
|
+
|
401
|
+
[build-system]
|
402
|
+
requires = ["poetry-core>=1.6"]
|
403
|
+
build-backend = "poetry.core.masonry.api"
|
@@ -6,6 +6,8 @@ from typing import TYPE_CHECKING, Any, NewType, Union
|
|
6
6
|
from strawberry.types.scalar import scalar
|
7
7
|
|
8
8
|
if TYPE_CHECKING:
|
9
|
+
from collections.abc import Mapping
|
10
|
+
|
9
11
|
from strawberry.types.scalar import ScalarDefinition, ScalarWrapper
|
10
12
|
|
11
13
|
|
@@ -57,7 +59,7 @@ Base64 = scalar(
|
|
57
59
|
|
58
60
|
def is_scalar(
|
59
61
|
annotation: Any,
|
60
|
-
scalar_registry:
|
62
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
61
63
|
) -> bool:
|
62
64
|
if annotation in scalar_registry:
|
63
65
|
return True
|
@@ -10,6 +10,7 @@ from strawberry.types.base import StrawberryType, has_object_definition
|
|
10
10
|
# TYPE_CHECKING is enabled.
|
11
11
|
|
12
12
|
if TYPE_CHECKING:
|
13
|
+
from collections.abc import Mapping
|
13
14
|
from typing_extensions import TypeGuard
|
14
15
|
|
15
16
|
from strawberry.types.scalar import ScalarDefinition, ScalarWrapper
|
@@ -29,7 +30,7 @@ def is_interface_type(type_: Union[StrawberryType, type]) -> TypeGuard[type]:
|
|
29
30
|
|
30
31
|
def is_scalar(
|
31
32
|
type_: Union[StrawberryType, type],
|
32
|
-
scalar_registry:
|
33
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
33
34
|
) -> TypeGuard[type]:
|
34
35
|
return is_strawberry_scalar(type_, scalar_registry)
|
35
36
|
|
@@ -14,6 +14,7 @@ class StrawberryConfig:
|
|
14
14
|
name_converter: NameConverter = field(default_factory=NameConverter)
|
15
15
|
default_resolver: Callable[[Any, str], object] = getattr
|
16
16
|
relay_max_results: int = 100
|
17
|
+
relay_use_legacy_global_id: bool = False
|
17
18
|
disable_field_suggestions: bool = False
|
18
19
|
info_class: type[Info] = Info
|
19
20
|
|
@@ -46,7 +46,6 @@ from strawberry.extensions.directives import (
|
|
46
46
|
from strawberry.extensions.runner import SchemaExtensionsRunner
|
47
47
|
from strawberry.printer import print_schema
|
48
48
|
from strawberry.schema.schema_converter import GraphQLCoreConverter
|
49
|
-
from strawberry.schema.types.scalar import DEFAULT_SCALAR_REGISTRY
|
50
49
|
from strawberry.schema.validation_rules.one_of import OneOfInputValidationRule
|
51
50
|
from strawberry.types.base import (
|
52
51
|
StrawberryObjectDefinition,
|
@@ -69,7 +68,7 @@ from .config import StrawberryConfig
|
|
69
68
|
from .exceptions import InvalidOperationTypeError
|
70
69
|
|
71
70
|
if TYPE_CHECKING:
|
72
|
-
from collections.abc import Iterable
|
71
|
+
from collections.abc import Iterable, Mapping
|
73
72
|
from typing_extensions import TypeAlias
|
74
73
|
|
75
74
|
from graphql import ExecutionContext as GraphQLExecutionContext
|
@@ -151,7 +150,7 @@ class Schema(BaseSchema):
|
|
151
150
|
execution_context_class: Optional[type[GraphQLExecutionContext]] = None,
|
152
151
|
config: Optional[StrawberryConfig] = None,
|
153
152
|
scalar_overrides: Optional[
|
154
|
-
|
153
|
+
Mapping[object, Union[type, ScalarWrapper, ScalarDefinition]],
|
155
154
|
] = None,
|
156
155
|
schema_directives: Iterable[object] = (),
|
157
156
|
) -> None:
|
@@ -199,18 +198,12 @@ class Schema(BaseSchema):
|
|
199
198
|
self.execution_context_class = execution_context_class
|
200
199
|
self.config = config or StrawberryConfig()
|
201
200
|
|
202
|
-
SCALAR_OVERRIDES_DICT_TYPE = dict[
|
203
|
-
object, Union["ScalarWrapper", "ScalarDefinition"]
|
204
|
-
]
|
205
|
-
|
206
|
-
scalar_registry: SCALAR_OVERRIDES_DICT_TYPE = {**DEFAULT_SCALAR_REGISTRY}
|
207
|
-
if scalar_overrides:
|
208
|
-
# TODO: check that the overrides are valid
|
209
|
-
scalar_registry.update(cast("SCALAR_OVERRIDES_DICT_TYPE", scalar_overrides))
|
210
|
-
|
211
201
|
self.schema_converter = GraphQLCoreConverter(
|
212
|
-
self.config,
|
202
|
+
self.config,
|
203
|
+
scalar_overrides=scalar_overrides or {}, # type: ignore
|
204
|
+
get_fields=self.get_fields,
|
213
205
|
)
|
206
|
+
|
214
207
|
self.directives = directives
|
215
208
|
self.schema_directives = list(schema_directives)
|
216
209
|
|
{strawberry_graphql-0.267.0 → strawberry_graphql-0.268.0}/strawberry/schema/schema_converter.py
RENAMED
@@ -23,6 +23,7 @@ from graphql import (
|
|
23
23
|
GraphQLEnumValue,
|
24
24
|
GraphQLError,
|
25
25
|
GraphQLField,
|
26
|
+
GraphQLID,
|
26
27
|
GraphQLInputField,
|
27
28
|
GraphQLInputObjectType,
|
28
29
|
GraphQLInterfaceType,
|
@@ -30,6 +31,7 @@ from graphql import (
|
|
30
31
|
GraphQLNamedType,
|
31
32
|
GraphQLNonNull,
|
32
33
|
GraphQLObjectType,
|
34
|
+
GraphQLScalarType,
|
33
35
|
GraphQLType,
|
34
36
|
GraphQLUnionType,
|
35
37
|
Undefined,
|
@@ -48,7 +50,12 @@ from strawberry.exceptions import (
|
|
48
50
|
UnresolvedFieldTypeError,
|
49
51
|
)
|
50
52
|
from strawberry.extensions.field_extension import build_field_extension_resolvers
|
51
|
-
from strawberry.
|
53
|
+
from strawberry.relay.types import GlobalID
|
54
|
+
from strawberry.schema.types.scalar import (
|
55
|
+
DEFAULT_SCALAR_REGISTRY,
|
56
|
+
_get_scalar_definition,
|
57
|
+
_make_scalar_type,
|
58
|
+
)
|
52
59
|
from strawberry.types.arguments import StrawberryArgument, convert_arguments
|
53
60
|
from strawberry.types.base import (
|
54
61
|
StrawberryList,
|
@@ -64,7 +71,7 @@ from strawberry.types.enum import EnumDefinition
|
|
64
71
|
from strawberry.types.field import UNRESOLVED
|
65
72
|
from strawberry.types.lazy_type import LazyType
|
66
73
|
from strawberry.types.private import is_private
|
67
|
-
from strawberry.types.scalar import ScalarWrapper
|
74
|
+
from strawberry.types.scalar import ScalarWrapper, scalar
|
68
75
|
from strawberry.types.union import StrawberryUnion
|
69
76
|
from strawberry.types.unset import UNSET
|
70
77
|
from strawberry.utils.await_maybe import await_maybe
|
@@ -73,14 +80,13 @@ from . import compat
|
|
73
80
|
from .types.concrete_type import ConcreteType
|
74
81
|
|
75
82
|
if TYPE_CHECKING:
|
76
|
-
from collections.abc import Awaitable
|
83
|
+
from collections.abc import Awaitable, Mapping
|
77
84
|
|
78
85
|
from graphql import (
|
79
86
|
GraphQLInputType,
|
80
87
|
GraphQLNullableType,
|
81
88
|
GraphQLOutputType,
|
82
89
|
GraphQLResolveInfo,
|
83
|
-
GraphQLScalarType,
|
84
90
|
)
|
85
91
|
|
86
92
|
from strawberry.directive import StrawberryDirective
|
@@ -186,7 +192,7 @@ def get_arguments(
|
|
186
192
|
info: Info,
|
187
193
|
kwargs: Any,
|
188
194
|
config: StrawberryConfig,
|
189
|
-
scalar_registry:
|
195
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
190
196
|
) -> tuple[list[Any], dict[str, Any]]:
|
191
197
|
# TODO: An extension might have changed the resolver arguments,
|
192
198
|
# but we need them here since we are calling it.
|
@@ -243,14 +249,42 @@ class GraphQLCoreConverter:
|
|
243
249
|
def __init__(
|
244
250
|
self,
|
245
251
|
config: StrawberryConfig,
|
246
|
-
|
252
|
+
scalar_overrides: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
247
253
|
get_fields: Callable[[StrawberryObjectDefinition], list[StrawberryField]],
|
248
254
|
) -> None:
|
249
255
|
self.type_map: dict[str, ConcreteType] = {}
|
250
256
|
self.config = config
|
251
|
-
self.scalar_registry =
|
257
|
+
self.scalar_registry = self._get_scalar_registry(scalar_overrides)
|
252
258
|
self.get_fields = get_fields
|
253
259
|
|
260
|
+
def _get_scalar_registry(
|
261
|
+
self,
|
262
|
+
scalar_overrides: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
263
|
+
) -> Mapping[object, Union[ScalarWrapper, ScalarDefinition]]:
|
264
|
+
scalar_registry = {**DEFAULT_SCALAR_REGISTRY}
|
265
|
+
|
266
|
+
global_id_name = "GlobalID" if self.config.relay_use_legacy_global_id else "ID"
|
267
|
+
|
268
|
+
scalar_registry[GlobalID] = _get_scalar_definition(
|
269
|
+
scalar(
|
270
|
+
GlobalID,
|
271
|
+
name=global_id_name,
|
272
|
+
description=GraphQLID.description,
|
273
|
+
parse_literal=lambda v, vars=None: GlobalID.from_id( # noqa: A006
|
274
|
+
GraphQLID.parse_literal(v, vars)
|
275
|
+
),
|
276
|
+
parse_value=GlobalID.from_id,
|
277
|
+
serialize=str,
|
278
|
+
specified_by_url=("https://relay.dev/graphql/objectidentification.htm"),
|
279
|
+
)
|
280
|
+
)
|
281
|
+
|
282
|
+
if scalar_overrides:
|
283
|
+
# TODO: check that the overrides are valid
|
284
|
+
scalar_registry.update(scalar_overrides) # type: ignore
|
285
|
+
|
286
|
+
return scalar_registry
|
287
|
+
|
254
288
|
def from_argument(self, argument: StrawberryArgument) -> GraphQLArgument:
|
255
289
|
argument_type = cast(
|
256
290
|
"GraphQLInputType", self.from_maybe_optional(argument.type)
|
@@ -784,12 +818,20 @@ class GraphQLCoreConverter:
|
|
784
818
|
scalar_name = self.config.name_converter.from_type(scalar_definition)
|
785
819
|
|
786
820
|
if scalar_name not in self.type_map:
|
821
|
+
from strawberry.relay import GlobalID
|
822
|
+
|
823
|
+
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
824
|
+
GraphQLNamedType.reserved_types.pop("ID")
|
825
|
+
|
787
826
|
implementation = (
|
788
827
|
scalar_definition.implementation
|
789
828
|
if scalar_definition.implementation is not None
|
790
829
|
else _make_scalar_type(scalar_definition)
|
791
830
|
)
|
792
831
|
|
832
|
+
if scalar is GlobalID and hasattr(GraphQLNamedType, "reserved_types"):
|
833
|
+
GraphQLNamedType.reserved_types["ID"] = implementation
|
834
|
+
|
793
835
|
self.type_map[scalar_name] = ConcreteType(
|
794
836
|
definition=scalar_definition, implementation=implementation
|
795
837
|
)
|
@@ -12,10 +12,9 @@ from graphql import (
|
|
12
12
|
)
|
13
13
|
|
14
14
|
from strawberry.file_uploads.scalars import Upload
|
15
|
-
from strawberry.relay.types import GlobalID
|
16
15
|
from strawberry.scalars import ID
|
17
16
|
from strawberry.schema.types import base_scalars
|
18
|
-
from strawberry.types.scalar import ScalarDefinition
|
17
|
+
from strawberry.types.scalar import ScalarDefinition
|
19
18
|
|
20
19
|
|
21
20
|
def _make_scalar_type(definition: ScalarDefinition) -> GraphQLScalarType:
|
@@ -62,22 +61,9 @@ DEFAULT_SCALAR_REGISTRY: dict[object, ScalarDefinition] = {
|
|
62
61
|
datetime.datetime: _get_scalar_definition(base_scalars.DateTime),
|
63
62
|
datetime.time: _get_scalar_definition(base_scalars.Time),
|
64
63
|
decimal.Decimal: _get_scalar_definition(base_scalars.Decimal),
|
65
|
-
# We can't wrap GlobalID with @scalar because it has custom attributes/methods
|
66
|
-
GlobalID: _get_scalar_definition(
|
67
|
-
scalar(
|
68
|
-
GlobalID,
|
69
|
-
name="GlobalID",
|
70
|
-
description=GraphQLID.description,
|
71
|
-
parse_literal=lambda v, vars=None: GlobalID.from_id( # noqa: A006
|
72
|
-
GraphQLID.parse_literal(v, vars)
|
73
|
-
),
|
74
|
-
parse_value=GlobalID.from_id,
|
75
|
-
serialize=str,
|
76
|
-
specified_by_url=("https://relay.dev/graphql/objectidentification.htm"),
|
77
|
-
)
|
78
|
-
),
|
79
64
|
}
|
80
65
|
|
66
|
+
|
81
67
|
__all__ = [
|
82
68
|
"DEFAULT_SCALAR_REGISTRY",
|
83
69
|
"_get_scalar_definition",
|
@@ -147,7 +147,7 @@ class StrawberryArgument:
|
|
147
147
|
def convert_argument(
|
148
148
|
value: object,
|
149
149
|
type_: Union[StrawberryType, type],
|
150
|
-
scalar_registry:
|
150
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
151
151
|
config: StrawberryConfig,
|
152
152
|
) -> object:
|
153
153
|
# TODO: move this somewhere else and make it first class
|
@@ -207,7 +207,7 @@ def convert_argument(
|
|
207
207
|
def convert_arguments(
|
208
208
|
value: dict[str, Any],
|
209
209
|
arguments: list[StrawberryArgument],
|
210
|
-
scalar_registry:
|
210
|
+
scalar_registry: Mapping[object, Union[ScalarWrapper, ScalarDefinition]],
|
211
211
|
config: StrawberryConfig,
|
212
212
|
) -> dict[str, Any]:
|
213
213
|
"""Converts a nested dictionary to a dictionary of actual types.
|