strawberry-graphql 0.226.2__tar.gz → 0.227.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.226.2 → strawberry_graphql-0.227.0}/PKG-INFO +2 -1
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/pyproject.toml +4 -3
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema_codegen/__init__.py +96 -87
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/LICENSE +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/README.md +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/__main__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/handlers/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/test/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/test/client.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/annotation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/arguments.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/test/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/test/client.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/auto.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/chalice/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/chalice/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/base.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/http_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/router.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/testing.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/app.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/codegen.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/export_schema.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/schema_codegen.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/server.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/constants.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/debug_server.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/utils/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/utils/load_schema.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/exceptions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/print_operation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/python.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/typescript.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/query_codegen.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codemods/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codemods/annotated_unions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/custom_scalar.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/dataloader.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/directive.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/apps.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/context.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/test/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/test/client.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/enum.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/exception.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/exception_source.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/invalid_union_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/syntax.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/utils/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/utils/source_finder.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/_compat.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/conversion.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/error_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/fields.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/object_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/LICENSE +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/dataclasses/LICENSE +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/dataclasses/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/ext/mypy_plugin.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/add_validation_rules.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/base_extension.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/context.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/directives.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/disable_validation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/field_extension.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/mask_errors.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/max_aliases.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/max_tokens.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/parser_cache.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/pyinstrument.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/query_depth_limiter.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/runner.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/apollo.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/datadog.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/sentry.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/tracing/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/extensions/validation_cache.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/context.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/handlers/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/fastapi/router.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/argument.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/enum.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/field.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/mutation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/object_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/scalar.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/schema.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/schema_directive.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/schema_directives.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/federation/union.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/field.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/field_extensions/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/field_extensions/input_mutation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/file_uploads/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/file_uploads/scalars.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/file_uploads/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/flask/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/flask/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/async_base_view.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/base.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/exceptions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/ides.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/sync_base_view.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/temporal_response.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/http/typevars.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/lazy_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/litestar/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/litestar/controller.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/litestar/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/litestar/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/mutation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/object_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/parent.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/permission.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/printer/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/printer/ast_from_value.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/printer/printer.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/private.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/py.typed +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/quart/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/quart/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/relay/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/relay/exceptions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/relay/fields.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/relay/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/relay/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/resolvers.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/sanic/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/sanic/context.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/sanic/utils.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/sanic/views.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/scalars.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/base.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/compat.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/config.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/exceptions.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/execute.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/name_converter.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/schema.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/schema_converter.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/types/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/types/base_scalars.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/types/concrete_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema/types/scalar.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema_directive.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/starlite/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/starlite/controller.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/starlite/handlers/graphql_ws_handler.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/static/apollo-sandbox.html +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/static/graphiql.html +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/static/pathfinder.html +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/test/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/test/client.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/tools/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/tools/create_type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/tools/merge_types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/type.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/execution.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/fields/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/fields/resolver.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/graphql.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/info.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/nodes.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/type_resolver.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/types/types.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/union.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/unset.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/__init__.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/aio.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/await_maybe.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/dataclasses.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/debug.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/deprecations.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/graphql_lexer.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/importer.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/inspect.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/logging.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/operation.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/str_converters.py +0 -0
- {strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/utils/typing.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: strawberry-graphql
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.227.0
|
4
4
|
Summary: A library for creating GraphQL APIs
|
5
5
|
Home-page: https://strawberry.rocks/
|
6
6
|
License: MIT
|
@@ -44,6 +44,7 @@ Requires-Dist: chalice (>=1.22,<2.0) ; extra == "chalice"
|
|
44
44
|
Requires-Dist: channels (>=3.0.5) ; extra == "channels"
|
45
45
|
Requires-Dist: fastapi (>=0.65.2) ; extra == "fastapi"
|
46
46
|
Requires-Dist: flask (>=1.1) ; extra == "flask"
|
47
|
+
Requires-Dist: graphlib_backport ; (python_version < "3.9") and (extra == "cli")
|
47
48
|
Requires-Dist: graphql-core (>=3.2.0,<3.3.0)
|
48
49
|
Requires-Dist: libcst (>=0.4.7) ; extra == "debug" or extra == "debug-server" or extra == "cli"
|
49
50
|
Requires-Dist: litestar (>=2) ; (python_version >= "3.8") and (extra == "litestar")
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "strawberry-graphql"
|
3
3
|
packages = [ { include = "strawberry" } ]
|
4
|
-
version = "0.
|
4
|
+
version = "0.227.0"
|
5
5
|
description = "A library for creating GraphQL APIs"
|
6
6
|
authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
|
7
7
|
license = "MIT"
|
@@ -61,6 +61,7 @@ astunparse = {version = "^1.6.3", python = "<3.9"}
|
|
61
61
|
libcst = {version = ">=0.4.7", optional = true}
|
62
62
|
rich = {version = ">=12.0.0", optional = true}
|
63
63
|
pyinstrument = {version = ">=4.0.0", optional = true}
|
64
|
+
graphlib_backport = {version = "*", python = "<3.9", optional = true}
|
64
65
|
|
65
66
|
[tool.poetry.group.dev.dependencies]
|
66
67
|
asgiref = "^3.2"
|
@@ -102,7 +103,7 @@ pytest-mypy-plugins = "3.0.0"
|
|
102
103
|
poetry-plugin-export = "^1.6.0"
|
103
104
|
# another bug in poetry
|
104
105
|
urllib3 = "<2"
|
105
|
-
|
106
|
+
graphlib_backport = {version = "*", python = "<3.9", optional = false}
|
106
107
|
|
107
108
|
[tool.poetry.group.integrations]
|
108
109
|
optional = true
|
@@ -139,7 +140,7 @@ pydantic = ["pydantic"]
|
|
139
140
|
sanic = ["sanic"]
|
140
141
|
fastapi = ["fastapi", "python-multipart"]
|
141
142
|
chalice = ["chalice"]
|
142
|
-
cli = ["typer", "pygments", "rich", "libcst"]
|
143
|
+
cli = ["typer", "pygments", "rich", "libcst", "graphlib_backport"]
|
143
144
|
starlite = ["starlite"]
|
144
145
|
litestar = ["litestar"]
|
145
146
|
pyinstrument = ["pyinstrument"]
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/schema_codegen/__init__.py
RENAMED
@@ -7,6 +7,7 @@ from typing import TYPE_CHECKING, List, Tuple, Union
|
|
7
7
|
from typing_extensions import Protocol, TypeAlias
|
8
8
|
|
9
9
|
import libcst as cst
|
10
|
+
from graphlib import TopologicalSorter
|
10
11
|
from graphql import (
|
11
12
|
EnumTypeDefinitionNode,
|
12
13
|
EnumValueDefinitionNode,
|
@@ -177,19 +178,6 @@ def _get_argument(name: str, value: ArgumentValue) -> cst.Arg:
|
|
177
178
|
)
|
178
179
|
|
179
180
|
|
180
|
-
# TODO: this might be removed now
|
181
|
-
def _get_argument_list(name: str, values: list[ArgumentValue]) -> cst.Arg:
|
182
|
-
value = cst.List(
|
183
|
-
elements=[cst.Element(value=_sanitize_argument(value)) for value in values],
|
184
|
-
)
|
185
|
-
|
186
|
-
return cst.Arg(
|
187
|
-
value=value,
|
188
|
-
keyword=cst.Name(name),
|
189
|
-
equal=cst.AssignEqual(cst.SimpleWhitespace(""), cst.SimpleWhitespace("")),
|
190
|
-
)
|
191
|
-
|
192
|
-
|
193
181
|
def _get_field_value(
|
194
182
|
field: FieldDefinitionNode | InputValueDefinitionNode,
|
195
183
|
alias: str | None,
|
@@ -441,11 +429,11 @@ def _get_class_definition(
|
|
441
429
|
| InputObjectTypeDefinitionNode,
|
442
430
|
is_apollo_federation: bool,
|
443
431
|
imports: set[Import],
|
444
|
-
) ->
|
432
|
+
) -> Definition:
|
445
433
|
decorator = _get_strawberry_decorator(definition, is_apollo_federation, imports)
|
446
434
|
|
447
|
-
|
448
|
-
[
|
435
|
+
interfaces = (
|
436
|
+
[interface.name.value for interface in definition.interfaces]
|
449
437
|
if isinstance(
|
450
438
|
definition, (ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode)
|
451
439
|
)
|
@@ -453,21 +441,24 @@ def _get_class_definition(
|
|
453
441
|
else []
|
454
442
|
)
|
455
443
|
|
456
|
-
|
444
|
+
class_definition = cst.ClassDef(
|
457
445
|
name=cst.Name(definition.name.value),
|
458
|
-
bases=bases,
|
459
446
|
body=cst.IndentedBlock(
|
460
447
|
body=[
|
461
448
|
_get_field(field, is_apollo_federation, imports)
|
462
449
|
for field in definition.fields
|
463
450
|
]
|
464
451
|
),
|
452
|
+
bases=[cst.Arg(cst.Name(interface)) for interface in interfaces],
|
465
453
|
decorators=[decorator],
|
466
454
|
)
|
467
455
|
|
456
|
+
return Definition(class_definition, interfaces, definition.name.value)
|
457
|
+
|
468
458
|
|
469
459
|
def _get_enum_value(enum_value: EnumValueDefinitionNode) -> cst.SimpleStatementLine:
|
470
460
|
name = enum_value.name.value
|
461
|
+
|
471
462
|
return cst.SimpleStatementLine(
|
472
463
|
body=[
|
473
464
|
cst.Assign(
|
@@ -478,7 +469,7 @@ def _get_enum_value(enum_value: EnumValueDefinitionNode) -> cst.SimpleStatementL
|
|
478
469
|
)
|
479
470
|
|
480
471
|
|
481
|
-
def _get_enum_definition(definition: EnumTypeDefinitionNode) ->
|
472
|
+
def _get_enum_definition(definition: EnumTypeDefinitionNode) -> Definition:
|
482
473
|
decorator = cst.Decorator(
|
483
474
|
decorator=cst.Attribute(
|
484
475
|
value=cst.Name("strawberry"),
|
@@ -486,7 +477,7 @@ def _get_enum_definition(definition: EnumTypeDefinitionNode) -> cst.ClassDef:
|
|
486
477
|
),
|
487
478
|
)
|
488
479
|
|
489
|
-
|
480
|
+
class_definition = cst.ClassDef(
|
490
481
|
name=cst.Name(definition.name.value),
|
491
482
|
bases=[cst.Arg(cst.Name("Enum"))],
|
492
483
|
body=cst.IndentedBlock(
|
@@ -495,6 +486,12 @@ def _get_enum_definition(definition: EnumTypeDefinitionNode) -> cst.ClassDef:
|
|
495
486
|
decorators=[decorator],
|
496
487
|
)
|
497
488
|
|
489
|
+
return Definition(
|
490
|
+
class_definition,
|
491
|
+
[],
|
492
|
+
definition.name.value,
|
493
|
+
)
|
494
|
+
|
498
495
|
|
499
496
|
def _get_schema_definition(
|
500
497
|
root_query_name: str | None,
|
@@ -562,38 +559,54 @@ def _get_schema_definition(
|
|
562
559
|
)
|
563
560
|
|
564
561
|
|
565
|
-
|
562
|
+
@dataclasses.dataclass(frozen=True)
|
563
|
+
class Definition:
|
564
|
+
code: cst.CSTNode
|
565
|
+
dependencies: list[str]
|
566
|
+
name: str
|
567
|
+
|
568
|
+
|
569
|
+
def _get_union_definition(definition: UnionTypeDefinitionNode) -> Definition:
|
566
570
|
name = definition.name.value
|
567
571
|
|
568
572
|
types = cst.parse_expression(
|
569
573
|
" | ".join([type_.name.value for type_ in definition.types])
|
570
574
|
)
|
571
575
|
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
cst.
|
581
|
-
cst.
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
576
|
+
simple_statement = cst.SimpleStatementLine(
|
577
|
+
body=[
|
578
|
+
cst.Assign(
|
579
|
+
targets=[cst.AssignTarget(cst.Name(name))],
|
580
|
+
value=cst.Subscript(
|
581
|
+
value=cst.Name("Annotated"),
|
582
|
+
slice=[
|
583
|
+
cst.SubscriptElement(slice=cst.Index(types)),
|
584
|
+
cst.SubscriptElement(
|
585
|
+
slice=cst.Index(
|
586
|
+
cst.Call(
|
587
|
+
cst.Attribute(
|
588
|
+
value=cst.Name("strawberry"),
|
589
|
+
attr=cst.Name("union"),
|
590
|
+
),
|
591
|
+
args=[_get_argument("name", name)],
|
592
|
+
)
|
593
|
+
)
|
594
|
+
),
|
595
|
+
],
|
588
596
|
),
|
589
|
-
|
590
|
-
|
597
|
+
)
|
598
|
+
]
|
599
|
+
)
|
600
|
+
return Definition(
|
601
|
+
simple_statement,
|
602
|
+
[],
|
603
|
+
definition.name.value,
|
591
604
|
)
|
592
605
|
|
593
606
|
|
594
607
|
def _get_scalar_definition(
|
595
608
|
definition: ScalarTypeDefinitionNode, imports: set[Import]
|
596
|
-
) ->
|
609
|
+
) -> Definition | None:
|
597
610
|
name = definition.name.value
|
598
611
|
|
599
612
|
if name == "Date":
|
@@ -652,7 +665,7 @@ def _get_scalar_definition(
|
|
652
665
|
),
|
653
666
|
]
|
654
667
|
|
655
|
-
|
668
|
+
statement_definition = cst.SimpleStatementLine(
|
656
669
|
body=[
|
657
670
|
cst.Assign(
|
658
671
|
targets=[cst.AssignTarget(cst.Name(name))],
|
@@ -677,12 +690,13 @@ def _get_scalar_definition(
|
|
677
690
|
)
|
678
691
|
]
|
679
692
|
)
|
693
|
+
return Definition(statement_definition, [], name=definition.name.value)
|
680
694
|
|
681
695
|
|
682
696
|
def codegen(schema: str) -> str:
|
683
697
|
document = parse(schema)
|
684
698
|
|
685
|
-
definitions:
|
699
|
+
definitions: dict[str, Definition] = {}
|
686
700
|
|
687
701
|
root_query_name: str | None = None
|
688
702
|
root_mutation_name: str | None = None
|
@@ -692,17 +706,17 @@ def codegen(schema: str) -> str:
|
|
692
706
|
Import(module=None, imports=("strawberry",)),
|
693
707
|
}
|
694
708
|
|
695
|
-
object_types: dict[str, cst.ClassDef] = {}
|
696
|
-
|
697
709
|
# when we encounter a extend schema @link ..., we check if is an apollo federation schema
|
698
710
|
# and we use this variable to keep track of it, but at the moment the assumption is that
|
699
711
|
# the schema extension is always done at the top, this might not be the case all the
|
700
712
|
# time
|
701
713
|
is_apollo_federation = False
|
702
714
|
|
703
|
-
for
|
715
|
+
for graphql_definition in document.definitions:
|
716
|
+
definition: Definition | None = None
|
717
|
+
|
704
718
|
if isinstance(
|
705
|
-
|
719
|
+
graphql_definition,
|
706
720
|
(
|
707
721
|
ObjectTypeDefinitionNode,
|
708
722
|
InterfaceTypeDefinitionNode,
|
@@ -710,23 +724,17 @@ def codegen(schema: str) -> str:
|
|
710
724
|
ObjectTypeExtensionNode,
|
711
725
|
),
|
712
726
|
):
|
713
|
-
|
714
|
-
|
727
|
+
definition = _get_class_definition(
|
728
|
+
graphql_definition, is_apollo_federation, imports
|
715
729
|
)
|
716
730
|
|
717
|
-
|
718
|
-
|
719
|
-
definitions.append(cst.EmptyLine())
|
720
|
-
definitions.append(class_definition)
|
721
|
-
|
722
|
-
elif isinstance(definition, EnumTypeDefinitionNode):
|
731
|
+
elif isinstance(graphql_definition, EnumTypeDefinitionNode):
|
723
732
|
imports.add(Import(module="enum", imports=("Enum",)))
|
724
733
|
|
725
|
-
|
726
|
-
definitions.append(_get_enum_definition(definition))
|
734
|
+
definition = _get_enum_definition(graphql_definition)
|
727
735
|
|
728
|
-
elif isinstance(
|
729
|
-
for operation_type_definition in
|
736
|
+
elif isinstance(graphql_definition, SchemaDefinitionNode):
|
737
|
+
for operation_type_definition in graphql_definition.operation_types:
|
730
738
|
if operation_type_definition.operation == OperationType.QUERY:
|
731
739
|
root_query_name = operation_type_definition.type.name.value
|
732
740
|
elif operation_type_definition.operation == OperationType.MUTATION:
|
@@ -737,36 +745,33 @@ def codegen(schema: str) -> str:
|
|
737
745
|
raise NotImplementedError(
|
738
746
|
f"Unknown operation {operation_type_definition.operation}"
|
739
747
|
)
|
740
|
-
elif isinstance(
|
748
|
+
elif isinstance(graphql_definition, UnionTypeDefinitionNode):
|
741
749
|
imports.add(Import(module="typing", imports=("Annotated",)))
|
742
750
|
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
if scalar_definition is not None:
|
750
|
-
definitions.append(cst.EmptyLine())
|
751
|
-
definitions.append(scalar_definition)
|
752
|
-
definitions.append(cst.EmptyLine())
|
753
|
-
elif isinstance(definition, SchemaExtensionNode):
|
751
|
+
definition = _get_union_definition(graphql_definition)
|
752
|
+
elif isinstance(graphql_definition, ScalarTypeDefinitionNode):
|
753
|
+
definition = _get_scalar_definition(graphql_definition, imports)
|
754
|
+
|
755
|
+
elif isinstance(graphql_definition, SchemaExtensionNode):
|
754
756
|
is_apollo_federation = any(
|
755
757
|
_is_federation_link_directive(directive)
|
756
|
-
for directive in
|
758
|
+
for directive in graphql_definition.directives
|
757
759
|
)
|
758
760
|
else:
|
759
761
|
raise NotImplementedError(f"Unknown definition {definition}")
|
760
762
|
|
763
|
+
if definition is not None:
|
764
|
+
definitions[definition.name] = definition
|
765
|
+
|
761
766
|
if root_query_name is None:
|
762
|
-
root_query_name = "Query" if "Query" in
|
767
|
+
root_query_name = "Query" if "Query" in definitions else None
|
763
768
|
|
764
769
|
if root_mutation_name is None:
|
765
|
-
root_mutation_name = "Mutation" if "Mutation" in
|
770
|
+
root_mutation_name = "Mutation" if "Mutation" in definitions else None
|
766
771
|
|
767
772
|
if root_subscription_name is None:
|
768
773
|
root_subscription_name = (
|
769
|
-
"Subscription" if "Subscription" in
|
774
|
+
"Subscription" if "Subscription" in definitions else None
|
770
775
|
)
|
771
776
|
|
772
777
|
schema_definition = _get_schema_definition(
|
@@ -777,19 +782,23 @@ def codegen(schema: str) -> str:
|
|
777
782
|
)
|
778
783
|
|
779
784
|
if schema_definition:
|
780
|
-
definitions
|
781
|
-
definitions.append(schema_definition)
|
785
|
+
definitions["Schema"] = Definition(schema_definition, [], "schema")
|
782
786
|
|
783
|
-
|
784
|
-
body=[
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
787
|
+
body: list[cst.CSTNode] = [
|
788
|
+
cst.SimpleStatementLine(body=[import_.to_cst()])
|
789
|
+
for import_ in sorted(imports, key=lambda i: (i.module or "", i.imports))
|
790
|
+
]
|
791
|
+
|
792
|
+
# DAG to sort definitions based on dependencies
|
793
|
+
graph = {name: definition.dependencies for name, definition in definitions.items()}
|
794
|
+
ts = TopologicalSorter(graph)
|
795
|
+
|
796
|
+
for definition_name in tuple(ts.static_order()):
|
797
|
+
definition = definitions[definition_name]
|
798
|
+
|
799
|
+
body.append(cst.EmptyLine())
|
800
|
+
body.append(definition.code)
|
801
|
+
|
802
|
+
module = cst.Module(body=body) # type: ignore
|
794
803
|
|
795
804
|
return module.code
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/handlers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/aiohttp/test/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/asgi/handlers/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/base.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/channels/handlers/ws_handler.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/__init__.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/codegen.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/export_schema.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/commands/schema_codegen.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/cli/utils/load_schema.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/__init__.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/python.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/plugins/typescript.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codegen/query_codegen.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/codemods/annotated_unions.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/django/test/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/exception.py
RENAMED
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/exception_source.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/exceptions/utils/__init__.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/fields.py
RENAMED
File without changes
|
File without changes
|
{strawberry_graphql-0.226.2 → strawberry_graphql-0.227.0}/strawberry/experimental/pydantic/utils.py
RENAMED
File without changes
|