strawberry-graphql 0.221.1__tar.gz → 0.223.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.221.1 → strawberry_graphql-0.223.0}/PKG-INFO +1 -1
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/pyproject.toml +1 -1
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/handlers/http_handler.py +1 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/enum.py +37 -4
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/field.py +53 -24
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/object_type.py +81 -27
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/scalar.py +26 -1
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/schema_directives.py +70 -12
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/printer/printer.py +3 -1
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema_codegen/__init__.py +310 -32
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/nodes.py +1 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/LICENSE +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/README.md +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/arguments.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/auto.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/custom_scalar.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/enum.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/sentry.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/field.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/async_base_view.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/lazy_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/litestar/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/litestar/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/mutation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/object_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/private.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/execute.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/schema.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/starlite/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/starlite/controller.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/starlite/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/type.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/types/types.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/union.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/unset.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/utils/typing.py +0 -0
@@ -1,6 +1,15 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from typing import
|
3
|
+
from typing import (
|
4
|
+
TYPE_CHECKING,
|
5
|
+
Any,
|
6
|
+
Callable,
|
7
|
+
Iterable,
|
8
|
+
List,
|
9
|
+
Optional,
|
10
|
+
Union,
|
11
|
+
overload,
|
12
|
+
)
|
4
13
|
|
5
14
|
from strawberry.enum import _process_enum
|
6
15
|
from strawberry.enum import enum_value as base_enum_value
|
@@ -36,7 +45,10 @@ def enum(
|
|
36
45
|
name: Optional[str] = None,
|
37
46
|
description: Optional[str] = None,
|
38
47
|
directives: Iterable[object] = (),
|
48
|
+
authenticated: bool = False,
|
39
49
|
inaccessible: bool = False,
|
50
|
+
policy: Optional[List[List[str]]] = None,
|
51
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
40
52
|
tags: Optional[Iterable[str]] = (),
|
41
53
|
) -> EnumType:
|
42
54
|
...
|
@@ -49,7 +61,10 @@ def enum(
|
|
49
61
|
name: Optional[str] = None,
|
50
62
|
description: Optional[str] = None,
|
51
63
|
directives: Iterable[object] = (),
|
64
|
+
authenticated: bool = False,
|
52
65
|
inaccessible: bool = False,
|
66
|
+
policy: Optional[List[List[str]]] = None,
|
67
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
53
68
|
tags: Optional[Iterable[str]] = (),
|
54
69
|
) -> Callable[[EnumType], EnumType]:
|
55
70
|
...
|
@@ -61,8 +76,11 @@ def enum(
|
|
61
76
|
name=None,
|
62
77
|
description=None,
|
63
78
|
directives=(),
|
64
|
-
|
65
|
-
|
79
|
+
authenticated: bool = False,
|
80
|
+
inaccessible: bool = False,
|
81
|
+
policy: Optional[List[List[str]]] = None,
|
82
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
83
|
+
tags: Optional[Iterable[str]] = (),
|
66
84
|
) -> Union[EnumType, Callable[[EnumType], EnumType]]:
|
67
85
|
"""Registers the enum in the GraphQL type system.
|
68
86
|
|
@@ -70,13 +88,28 @@ def enum(
|
|
70
88
|
the value passed of name instead of the Enum class name.
|
71
89
|
"""
|
72
90
|
|
73
|
-
from strawberry.federation.schema_directives import
|
91
|
+
from strawberry.federation.schema_directives import (
|
92
|
+
Authenticated,
|
93
|
+
Inaccessible,
|
94
|
+
Policy,
|
95
|
+
RequiresScopes,
|
96
|
+
Tag,
|
97
|
+
)
|
74
98
|
|
75
99
|
directives = list(directives)
|
76
100
|
|
101
|
+
if authenticated:
|
102
|
+
directives.append(Authenticated())
|
103
|
+
|
77
104
|
if inaccessible:
|
78
105
|
directives.append(Inaccessible())
|
79
106
|
|
107
|
+
if policy:
|
108
|
+
directives.append(Policy(policies=policy))
|
109
|
+
|
110
|
+
if requires_scopes:
|
111
|
+
directives.append(RequiresScopes(scopes=requires_scopes))
|
112
|
+
|
80
113
|
if tags:
|
81
114
|
directives.extend(Tag(name=tag) for tag in tags)
|
82
115
|
|
@@ -25,6 +25,7 @@ if TYPE_CHECKING:
|
|
25
25
|
from strawberry.field import _RESOLVER_TYPE, StrawberryField
|
26
26
|
from strawberry.permission import BasePermission
|
27
27
|
|
28
|
+
from .schema_directives import Override
|
28
29
|
|
29
30
|
T = TypeVar("T")
|
30
31
|
|
@@ -36,13 +37,16 @@ def field(
|
|
36
37
|
name: Optional[str] = None,
|
37
38
|
is_subscription: bool = False,
|
38
39
|
description: Optional[str] = None,
|
40
|
+
authenticated: bool = False,
|
41
|
+
external: bool = False,
|
42
|
+
inaccessible: bool = False,
|
43
|
+
policy: Optional[List[List[str]]] = None,
|
39
44
|
provides: Optional[List[str]] = None,
|
45
|
+
override: Optional[Union[Override, str]] = None,
|
40
46
|
requires: Optional[List[str]] = None,
|
41
|
-
|
42
|
-
shareable: bool = False,
|
47
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
43
48
|
tags: Optional[Iterable[str]] = (),
|
44
|
-
|
45
|
-
inaccessible: bool = False,
|
49
|
+
shareable: bool = False,
|
46
50
|
init: Literal[False] = False,
|
47
51
|
permission_classes: Optional[List[Type[BasePermission]]] = None,
|
48
52
|
deprecation_reason: Optional[str] = None,
|
@@ -61,13 +65,16 @@ def field(
|
|
61
65
|
name: Optional[str] = None,
|
62
66
|
is_subscription: bool = False,
|
63
67
|
description: Optional[str] = None,
|
68
|
+
authenticated: bool = False,
|
69
|
+
external: bool = False,
|
70
|
+
inaccessible: bool = False,
|
71
|
+
policy: Optional[List[List[str]]] = None,
|
64
72
|
provides: Optional[List[str]] = None,
|
73
|
+
override: Optional[Union[Override, str]] = None,
|
65
74
|
requires: Optional[List[str]] = None,
|
66
|
-
|
67
|
-
shareable: bool = False,
|
75
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
68
76
|
tags: Optional[Iterable[str]] = (),
|
69
|
-
|
70
|
-
inaccessible: bool = False,
|
77
|
+
shareable: bool = False,
|
71
78
|
init: Literal[True] = True,
|
72
79
|
permission_classes: Optional[List[Type[BasePermission]]] = None,
|
73
80
|
deprecation_reason: Optional[str] = None,
|
@@ -87,13 +94,16 @@ def field(
|
|
87
94
|
name: Optional[str] = None,
|
88
95
|
is_subscription: bool = False,
|
89
96
|
description: Optional[str] = None,
|
97
|
+
authenticated: bool = False,
|
98
|
+
external: bool = False,
|
99
|
+
inaccessible: bool = False,
|
100
|
+
policy: Optional[List[List[str]]] = None,
|
90
101
|
provides: Optional[List[str]] = None,
|
102
|
+
override: Optional[Union[Override, str]] = None,
|
91
103
|
requires: Optional[List[str]] = None,
|
92
|
-
|
93
|
-
shareable: bool = False,
|
104
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
94
105
|
tags: Optional[Iterable[str]] = (),
|
95
|
-
|
96
|
-
inaccessible: bool = False,
|
106
|
+
shareable: bool = False,
|
97
107
|
permission_classes: Optional[List[Type[BasePermission]]] = None,
|
98
108
|
deprecation_reason: Optional[str] = None,
|
99
109
|
default: Any = UNSET,
|
@@ -111,13 +121,16 @@ def field(
|
|
111
121
|
name: Optional[str] = None,
|
112
122
|
is_subscription: bool = False,
|
113
123
|
description: Optional[str] = None,
|
124
|
+
authenticated: bool = False,
|
125
|
+
external: bool = False,
|
126
|
+
inaccessible: bool = False,
|
127
|
+
policy: Optional[List[List[str]]] = None,
|
114
128
|
provides: Optional[List[str]] = None,
|
129
|
+
override: Optional[Union[Override, str]] = None,
|
115
130
|
requires: Optional[List[str]] = None,
|
116
|
-
|
117
|
-
shareable: bool = False,
|
131
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
118
132
|
tags: Optional[Iterable[str]] = (),
|
119
|
-
|
120
|
-
inaccessible: bool = False,
|
133
|
+
shareable: bool = False,
|
121
134
|
permission_classes: Optional[List[Type[BasePermission]]] = None,
|
122
135
|
deprecation_reason: Optional[str] = None,
|
123
136
|
default: Any = dataclasses.MISSING,
|
@@ -131,25 +144,47 @@ def field(
|
|
131
144
|
init: Literal[True, False, None] = None,
|
132
145
|
) -> Any:
|
133
146
|
from .schema_directives import (
|
147
|
+
Authenticated,
|
134
148
|
External,
|
135
149
|
Inaccessible,
|
136
150
|
Override,
|
151
|
+
Policy,
|
137
152
|
Provides,
|
138
153
|
Requires,
|
154
|
+
RequiresScopes,
|
139
155
|
Shareable,
|
140
156
|
Tag,
|
141
157
|
)
|
142
158
|
|
143
159
|
directives = list(directives)
|
144
160
|
|
161
|
+
if authenticated:
|
162
|
+
directives.append(Authenticated())
|
163
|
+
|
164
|
+
if external:
|
165
|
+
directives.append(External())
|
166
|
+
|
167
|
+
if inaccessible:
|
168
|
+
directives.append(Inaccessible())
|
169
|
+
|
170
|
+
if override:
|
171
|
+
directives.append(
|
172
|
+
Override(override_from=override, label=UNSET)
|
173
|
+
if isinstance(override, str)
|
174
|
+
else override
|
175
|
+
)
|
176
|
+
|
177
|
+
if policy:
|
178
|
+
directives.append(Policy(policies=policy))
|
179
|
+
|
145
180
|
if provides:
|
146
181
|
directives.append(Provides(fields=" ".join(provides)))
|
147
182
|
|
148
183
|
if requires:
|
149
184
|
directives.append(Requires(fields=" ".join(requires)))
|
150
185
|
|
151
|
-
if
|
152
|
-
directives.append(
|
186
|
+
if requires_scopes:
|
187
|
+
directives.append(RequiresScopes(scopes=requires_scopes))
|
153
188
|
|
154
189
|
if shareable:
|
155
190
|
directives.append(Shareable())
|
@@ -157,12 +192,6 @@ def field(
|
|
157
192
|
if tags:
|
158
193
|
directives.extend(Tag(name=tag) for tag in tags)
|
159
194
|
|
160
|
-
if override:
|
161
|
-
directives.append(Override(override_from=override))
|
162
|
-
|
163
|
-
if inaccessible:
|
164
|
-
directives.append(Inaccessible())
|
165
|
-
|
166
195
|
return base_field( # type: ignore
|
167
196
|
resolver=resolver, # type: ignore
|
168
197
|
name=name,
|
{strawberry_graphql-0.221.1 → strawberry_graphql-0.223.0}/strawberry/federation/object_type.py
RENAMED
@@ -2,6 +2,7 @@ from typing import (
|
|
2
2
|
TYPE_CHECKING,
|
3
3
|
Callable,
|
4
4
|
Iterable,
|
5
|
+
List,
|
5
6
|
Optional,
|
6
7
|
Sequence,
|
7
8
|
Type,
|
@@ -31,19 +32,25 @@ def _impl_type(
|
|
31
32
|
name: Optional[str] = None,
|
32
33
|
description: Optional[str] = None,
|
33
34
|
directives: Iterable[object] = (),
|
35
|
+
authenticated: bool = False,
|
34
36
|
keys: Iterable[Union["Key", str]] = (),
|
35
37
|
extend: bool = False,
|
36
38
|
shareable: bool = False,
|
37
39
|
inaccessible: bool = UNSET,
|
40
|
+
policy: Optional[List[List[str]]] = None,
|
41
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
38
42
|
tags: Iterable[str] = (),
|
39
43
|
is_input: bool = False,
|
40
44
|
is_interface: bool = False,
|
41
45
|
is_interface_object: bool = False,
|
42
46
|
) -> T:
|
43
47
|
from strawberry.federation.schema_directives import (
|
48
|
+
Authenticated,
|
44
49
|
Inaccessible,
|
45
50
|
InterfaceObject,
|
46
51
|
Key,
|
52
|
+
Policy,
|
53
|
+
RequiresScopes,
|
47
54
|
Shareable,
|
48
55
|
Tag,
|
49
56
|
)
|
@@ -55,12 +62,21 @@ def _impl_type(
|
|
55
62
|
for key in keys
|
56
63
|
)
|
57
64
|
|
58
|
-
if
|
59
|
-
directives.append(
|
65
|
+
if authenticated:
|
66
|
+
directives.append(Authenticated())
|
60
67
|
|
61
68
|
if inaccessible is not UNSET:
|
62
69
|
directives.append(Inaccessible())
|
63
70
|
|
71
|
+
if policy:
|
72
|
+
directives.append(Policy(policies=policy))
|
73
|
+
|
74
|
+
if requires_scopes:
|
75
|
+
directives.append(RequiresScopes(scopes=requires_scopes))
|
76
|
+
|
77
|
+
if shareable:
|
78
|
+
directives.append(Shareable())
|
79
|
+
|
64
80
|
if tags:
|
65
81
|
directives.extend(Tag(name=tag) for tag in tags)
|
66
82
|
|
@@ -89,10 +105,15 @@ def type(
|
|
89
105
|
*,
|
90
106
|
name: Optional[str] = None,
|
91
107
|
description: Optional[str] = None,
|
92
|
-
|
108
|
+
directives: Iterable[object] = (),
|
109
|
+
authenticated: bool = False,
|
110
|
+
extend: bool = False,
|
93
111
|
inaccessible: bool = UNSET,
|
112
|
+
keys: Iterable[Union["Key", str]] = (),
|
113
|
+
policy: Optional[List[List[str]]] = None,
|
114
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
115
|
+
shareable: bool = False,
|
94
116
|
tags: Iterable[str] = (),
|
95
|
-
extend: bool = False,
|
96
117
|
) -> T:
|
97
118
|
...
|
98
119
|
|
@@ -107,12 +128,15 @@ def type(
|
|
107
128
|
*,
|
108
129
|
name: Optional[str] = None,
|
109
130
|
description: Optional[str] = None,
|
110
|
-
|
111
|
-
|
112
|
-
tags: Iterable[str] = (),
|
131
|
+
directives: Iterable[object] = (),
|
132
|
+
authenticated: bool = False,
|
113
133
|
extend: bool = False,
|
134
|
+
inaccessible: bool = UNSET,
|
135
|
+
keys: Iterable[Union["Key", str]] = (),
|
136
|
+
policy: Optional[List[List[str]]] = None,
|
137
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
114
138
|
shareable: bool = False,
|
115
|
-
|
139
|
+
tags: Iterable[str] = (),
|
116
140
|
) -> Callable[[T], T]:
|
117
141
|
...
|
118
142
|
|
@@ -122,22 +146,28 @@ def type(
|
|
122
146
|
*,
|
123
147
|
name: Optional[str] = None,
|
124
148
|
description: Optional[str] = None,
|
125
|
-
|
126
|
-
|
127
|
-
tags: Iterable[str] = (),
|
149
|
+
directives: Iterable[object] = (),
|
150
|
+
authenticated: bool = False,
|
128
151
|
extend: bool = False,
|
152
|
+
inaccessible: bool = UNSET,
|
153
|
+
keys: Iterable[Union["Key", str]] = (),
|
154
|
+
policy: Optional[List[List[str]]] = None,
|
155
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
129
156
|
shareable: bool = False,
|
130
|
-
|
157
|
+
tags: Iterable[str] = (),
|
131
158
|
):
|
132
159
|
return _impl_type(
|
133
160
|
cls,
|
134
161
|
name=name,
|
135
162
|
description=description,
|
136
163
|
directives=directives,
|
164
|
+
authenticated=authenticated,
|
137
165
|
keys=keys,
|
138
166
|
extend=extend,
|
139
|
-
shareable=shareable,
|
140
167
|
inaccessible=inaccessible,
|
168
|
+
policy=policy,
|
169
|
+
requires_scopes=requires_scopes,
|
170
|
+
shareable=shareable,
|
141
171
|
tags=tags,
|
142
172
|
)
|
143
173
|
|
@@ -208,10 +238,13 @@ def interface(
|
|
208
238
|
*,
|
209
239
|
name: Optional[str] = None,
|
210
240
|
description: Optional[str] = None,
|
211
|
-
|
241
|
+
directives: Iterable[object] = (),
|
242
|
+
authenticated: bool = False,
|
212
243
|
inaccessible: bool = UNSET,
|
244
|
+
keys: Iterable[Union["Key", str]] = (),
|
245
|
+
policy: Optional[List[List[str]]] = None,
|
246
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
213
247
|
tags: Iterable[str] = (),
|
214
|
-
directives: Iterable[object] = (),
|
215
248
|
) -> T:
|
216
249
|
...
|
217
250
|
|
@@ -226,10 +259,13 @@ def interface(
|
|
226
259
|
*,
|
227
260
|
name: Optional[str] = None,
|
228
261
|
description: Optional[str] = None,
|
229
|
-
|
262
|
+
directives: Iterable[object] = (),
|
263
|
+
authenticated: bool = False,
|
230
264
|
inaccessible: bool = UNSET,
|
265
|
+
keys: Iterable[Union["Key", str]] = (),
|
266
|
+
policy: Optional[List[List[str]]] = None,
|
267
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
231
268
|
tags: Iterable[str] = (),
|
232
|
-
directives: Iterable[object] = (),
|
233
269
|
) -> Callable[[T], T]:
|
234
270
|
...
|
235
271
|
|
@@ -239,20 +275,26 @@ def interface(
|
|
239
275
|
*,
|
240
276
|
name: Optional[str] = None,
|
241
277
|
description: Optional[str] = None,
|
242
|
-
|
278
|
+
directives: Iterable[object] = (),
|
279
|
+
authenticated: bool = False,
|
243
280
|
inaccessible: bool = UNSET,
|
281
|
+
keys: Iterable[Union["Key", str]] = (),
|
282
|
+
policy: Optional[List[List[str]]] = None,
|
283
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
244
284
|
tags: Iterable[str] = (),
|
245
|
-
directives: Iterable[object] = (),
|
246
285
|
):
|
247
286
|
return _impl_type(
|
248
287
|
cls,
|
249
288
|
name=name,
|
250
289
|
description=description,
|
251
290
|
directives=directives,
|
291
|
+
authenticated=authenticated,
|
252
292
|
keys=keys,
|
253
293
|
inaccessible=inaccessible,
|
254
|
-
|
294
|
+
policy=policy,
|
295
|
+
requires_scopes=requires_scopes,
|
255
296
|
tags=tags,
|
297
|
+
is_interface=True,
|
256
298
|
)
|
257
299
|
|
258
300
|
|
@@ -265,12 +307,15 @@ def interface(
|
|
265
307
|
def interface_object(
|
266
308
|
cls: T,
|
267
309
|
*,
|
268
|
-
keys: Iterable[Union["Key", str]],
|
269
310
|
name: Optional[str] = None,
|
270
311
|
description: Optional[str] = None,
|
312
|
+
directives: Iterable[object] = (),
|
313
|
+
authenticated: bool = False,
|
271
314
|
inaccessible: bool = UNSET,
|
315
|
+
keys: Iterable[Union["Key", str]] = (),
|
316
|
+
policy: Optional[List[List[str]]] = None,
|
317
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
272
318
|
tags: Iterable[str] = (),
|
273
|
-
directives: Iterable[object] = (),
|
274
319
|
) -> T:
|
275
320
|
...
|
276
321
|
|
@@ -283,12 +328,15 @@ def interface_object(
|
|
283
328
|
)
|
284
329
|
def interface_object(
|
285
330
|
*,
|
286
|
-
keys: Iterable[Union["Key", str]],
|
287
331
|
name: Optional[str] = None,
|
288
332
|
description: Optional[str] = None,
|
333
|
+
directives: Iterable[object] = (),
|
334
|
+
authenticated: bool = False,
|
289
335
|
inaccessible: bool = UNSET,
|
336
|
+
keys: Iterable[Union["Key", str]] = (),
|
337
|
+
policy: Optional[List[List[str]]] = None,
|
338
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
290
339
|
tags: Iterable[str] = (),
|
291
|
-
directives: Iterable[object] = (),
|
292
340
|
) -> Callable[[T], T]:
|
293
341
|
...
|
294
342
|
|
@@ -296,21 +344,27 @@ def interface_object(
|
|
296
344
|
def interface_object(
|
297
345
|
cls: Optional[T] = None,
|
298
346
|
*,
|
299
|
-
keys: Iterable[Union["Key", str]],
|
300
347
|
name: Optional[str] = None,
|
301
348
|
description: Optional[str] = None,
|
349
|
+
directives: Iterable[object] = (),
|
350
|
+
authenticated: bool = False,
|
302
351
|
inaccessible: bool = UNSET,
|
352
|
+
keys: Iterable[Union["Key", str]] = (),
|
353
|
+
policy: Optional[List[List[str]]] = None,
|
354
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
303
355
|
tags: Iterable[str] = (),
|
304
|
-
directives: Iterable[object] = (),
|
305
356
|
):
|
306
357
|
return _impl_type(
|
307
358
|
cls,
|
308
359
|
name=name,
|
309
360
|
description=description,
|
310
361
|
directives=directives,
|
362
|
+
authenticated=authenticated,
|
311
363
|
keys=keys,
|
312
364
|
inaccessible=inaccessible,
|
365
|
+
policy=policy,
|
366
|
+
requires_scopes=requires_scopes,
|
367
|
+
tags=tags,
|
313
368
|
is_interface=False,
|
314
369
|
is_interface_object=True,
|
315
|
-
tags=tags,
|
316
370
|
)
|
@@ -3,6 +3,7 @@ from typing import (
|
|
3
3
|
Any,
|
4
4
|
Callable,
|
5
5
|
Iterable,
|
6
|
+
List,
|
6
7
|
NewType,
|
7
8
|
Optional,
|
8
9
|
Type,
|
@@ -34,7 +35,10 @@ def scalar(
|
|
34
35
|
parse_value: Optional[Callable] = None,
|
35
36
|
parse_literal: Optional[Callable] = None,
|
36
37
|
directives: Iterable[object] = (),
|
38
|
+
authenticated: bool = False,
|
37
39
|
inaccessible: bool = False,
|
40
|
+
policy: Optional[List[List[str]]] = None,
|
41
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
38
42
|
tags: Optional[Iterable[str]] = (),
|
39
43
|
) -> Callable[[_T], _T]:
|
40
44
|
...
|
@@ -51,7 +55,10 @@ def scalar(
|
|
51
55
|
parse_value: Optional[Callable] = None,
|
52
56
|
parse_literal: Optional[Callable] = None,
|
53
57
|
directives: Iterable[object] = (),
|
58
|
+
authenticated: bool = False,
|
54
59
|
inaccessible: bool = False,
|
60
|
+
policy: Optional[List[List[str]]] = None,
|
61
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
55
62
|
tags: Optional[Iterable[str]] = (),
|
56
63
|
) -> _T:
|
57
64
|
...
|
@@ -67,7 +74,10 @@ def scalar(
|
|
67
74
|
parse_value: Optional[Callable] = None,
|
68
75
|
parse_literal: Optional[Callable] = None,
|
69
76
|
directives: Iterable[object] = (),
|
77
|
+
authenticated: bool = False,
|
70
78
|
inaccessible: bool = False,
|
79
|
+
policy: Optional[List[List[str]]] = None,
|
80
|
+
requires_scopes: Optional[List[List[str]]] = None,
|
71
81
|
tags: Optional[Iterable[str]] = (),
|
72
82
|
) -> Any:
|
73
83
|
"""Annotates a class or type as a GraphQL custom scalar.
|
@@ -95,16 +105,31 @@ def scalar(
|
|
95
105
|
>>> self.items = items
|
96
106
|
|
97
107
|
"""
|
98
|
-
from strawberry.federation.schema_directives import
|
108
|
+
from strawberry.federation.schema_directives import (
|
109
|
+
Authenticated,
|
110
|
+
Inaccessible,
|
111
|
+
Policy,
|
112
|
+
RequiresScopes,
|
113
|
+
Tag,
|
114
|
+
)
|
99
115
|
|
100
116
|
if parse_value is None:
|
101
117
|
parse_value = cls
|
102
118
|
|
103
119
|
directives = list(directives)
|
104
120
|
|
121
|
+
if authenticated:
|
122
|
+
directives.append(Authenticated())
|
123
|
+
|
105
124
|
if inaccessible:
|
106
125
|
directives.append(Inaccessible())
|
107
126
|
|
127
|
+
if policy:
|
128
|
+
directives.append(Policy(policies=policy))
|
129
|
+
|
130
|
+
if requires_scopes:
|
131
|
+
directives.append(RequiresScopes(scopes=requires_scopes))
|
132
|
+
|
108
133
|
if tags:
|
109
134
|
directives.extend(Tag(name=tag) for tag in tags)
|
110
135
|
|