strawberry-graphql 0.263.1__tar.gz → 0.264.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.
Files changed (234) hide show
  1. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/pyproject.toml +6 -6
  3. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/aiohttp/views.py +1 -1
  4. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/annotation.py +9 -6
  5. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/asgi/__init__.py +1 -1
  6. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/chalice/views.py +2 -2
  7. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/codegen.py +1 -1
  8. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/query_codegen.py +6 -6
  9. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/views.py +2 -2
  10. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/handler.py +1 -1
  11. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/conversion.py +1 -1
  12. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/error_type.py +1 -1
  13. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/object_type.py +1 -1
  14. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/mypy_plugin.py +3 -3
  15. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/fastapi/router.py +1 -1
  16. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/schema.py +1 -1
  17. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/flask/views.py +2 -2
  18. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/async_base_view.py +1 -1
  19. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/litestar/controller.py +1 -1
  20. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/printer/printer.py +7 -7
  21. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/quart/views.py +1 -1
  22. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/relay/exceptions.py +3 -2
  23. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/relay/fields.py +7 -7
  24. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/relay/types.py +45 -39
  25. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/relay/utils.py +6 -2
  26. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/sanic/utils.py +2 -4
  27. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/sanic/views.py +1 -1
  28. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/schema.py +16 -12
  29. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +1 -1
  30. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +1 -1
  31. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/arguments.py +5 -4
  32. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/auto.py +1 -1
  33. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/field.py +1 -1
  34. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/fields/resolver.py +1 -1
  35. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/lazy_type.py +1 -1
  36. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/type_resolver.py +1 -1
  37. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/union.py +1 -1
  38. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/aio.py +20 -1
  39. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/operation.py +1 -1
  40. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/typing.py +5 -5
  41. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/LICENSE +0 -0
  42. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/README.md +0 -0
  43. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/__init__.py +0 -0
  44. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/__main__.py +0 -0
  45. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/aiohttp/__init__.py +0 -0
  46. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/aiohttp/test/__init__.py +0 -0
  47. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/aiohttp/test/client.py +0 -0
  48. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/asgi/test/__init__.py +0 -0
  49. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/asgi/test/client.py +0 -0
  50. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/chalice/__init__.py +0 -0
  51. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/__init__.py +0 -0
  52. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/handlers/__init__.py +0 -0
  53. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/handlers/base.py +0 -0
  54. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/handlers/http_handler.py +0 -0
  55. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/handlers/ws_handler.py +0 -0
  56. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/router.py +0 -0
  57. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/channels/testing.py +0 -0
  58. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/__init__.py +0 -0
  59. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/app.py +0 -0
  60. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/__init__.py +0 -0
  61. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/export_schema.py +0 -0
  62. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/schema_codegen.py +0 -0
  63. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/server.py +0 -0
  64. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  65. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  66. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  67. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/constants.py +0 -0
  68. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/debug_server.py +0 -0
  69. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/utils/__init__.py +0 -0
  70. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/cli/utils/load_schema.py +0 -0
  71. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/__init__.py +0 -0
  72. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/exceptions.py +0 -0
  73. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/plugins/__init__.py +0 -0
  74. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  75. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/plugins/python.py +0 -0
  76. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/plugins/typescript.py +0 -0
  77. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codegen/types.py +0 -0
  78. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codemods/__init__.py +0 -0
  79. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codemods/annotated_unions.py +0 -0
  80. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/codemods/update_imports.py +0 -0
  81. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/dataloader.py +0 -0
  82. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/directive.py +0 -0
  83. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/__init__.py +0 -0
  84. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/apps.py +0 -0
  85. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/context.py +0 -0
  86. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/test/__init__.py +0 -0
  87. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/django/test/client.py +0 -0
  88. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/__init__.py +0 -0
  89. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
  90. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
  91. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/exception.py +0 -0
  92. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/exception_source.py +0 -0
  93. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
  94. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  95. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  96. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/missing_dependencies.py +0 -0
  97. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
  98. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
  99. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  100. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  101. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
  102. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
  103. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
  104. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/syntax.py +0 -0
  105. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
  106. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/utils/__init__.py +0 -0
  107. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  108. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/__init__.py +0 -0
  109. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  110. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/_compat.py +0 -0
  111. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  112. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
  113. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/fields.py +0 -0
  114. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/experimental/pydantic/utils.py +0 -0
  115. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/LICENSE +0 -0
  116. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/__init__.py +0 -0
  117. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  118. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  119. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  120. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/__init__.py +0 -0
  121. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/add_validation_rules.py +0 -0
  122. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/base_extension.py +0 -0
  123. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/context.py +0 -0
  124. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/directives.py +0 -0
  125. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/disable_validation.py +0 -0
  126. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/field_extension.py +0 -0
  127. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/mask_errors.py +0 -0
  128. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/max_aliases.py +0 -0
  129. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/max_tokens.py +0 -0
  130. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/parser_cache.py +0 -0
  131. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/pyinstrument.py +0 -0
  132. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/query_depth_limiter.py +0 -0
  133. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/runner.py +0 -0
  134. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/tracing/__init__.py +0 -0
  135. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/tracing/apollo.py +0 -0
  136. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/tracing/datadog.py +0 -0
  137. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  138. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/tracing/utils.py +0 -0
  139. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/utils.py +0 -0
  140. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/extensions/validation_cache.py +0 -0
  141. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/fastapi/__init__.py +0 -0
  142. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/fastapi/context.py +0 -0
  143. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/__init__.py +0 -0
  144. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/argument.py +0 -0
  145. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/enum.py +0 -0
  146. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/field.py +0 -0
  147. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/mutation.py +0 -0
  148. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/object_type.py +0 -0
  149. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/scalar.py +0 -0
  150. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/schema_directive.py +0 -0
  151. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/schema_directives.py +0 -0
  152. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/types.py +0 -0
  153. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/federation/union.py +0 -0
  154. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/field_extensions/__init__.py +0 -0
  155. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/field_extensions/input_mutation.py +0 -0
  156. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/file_uploads/__init__.py +0 -0
  157. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/file_uploads/scalars.py +0 -0
  158. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/file_uploads/utils.py +0 -0
  159. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/flask/__init__.py +0 -0
  160. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/__init__.py +0 -0
  161. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/base.py +0 -0
  162. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/exceptions.py +0 -0
  163. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/ides.py +0 -0
  164. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/parse_content_type.py +0 -0
  165. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/sync_base_view.py +0 -0
  166. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/temporal_response.py +0 -0
  167. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/types.py +0 -0
  168. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/http/typevars.py +0 -0
  169. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/litestar/__init__.py +0 -0
  170. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/parent.py +0 -0
  171. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/permission.py +0 -0
  172. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/printer/__init__.py +0 -0
  173. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/printer/ast_from_value.py +0 -0
  174. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/py.typed +0 -0
  175. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/quart/__init__.py +0 -0
  176. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/relay/__init__.py +0 -0
  177. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/resolvers.py +0 -0
  178. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/sanic/__init__.py +0 -0
  179. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/sanic/context.py +0 -0
  180. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/scalars.py +0 -0
  181. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/__init__.py +0 -0
  182. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/base.py +0 -0
  183. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/compat.py +0 -0
  184. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/config.py +0 -0
  185. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/exceptions.py +0 -0
  186. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/name_converter.py +0 -0
  187. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/schema_converter.py +0 -0
  188. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/types/__init__.py +0 -0
  189. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/types/base_scalars.py +0 -0
  190. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/types/concrete_type.py +0 -0
  191. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/types/scalar.py +0 -0
  192. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/validation_rules/__init__.py +0 -0
  193. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema/validation_rules/one_of.py +0 -0
  194. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema_codegen/__init__.py +0 -0
  195. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema_directive.py +0 -0
  196. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/schema_directives.py +0 -0
  197. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/static/apollo-sandbox.html +0 -0
  198. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/static/graphiql.html +0 -0
  199. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/static/pathfinder.html +0 -0
  200. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/__init__.py +0 -0
  201. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  202. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  203. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  204. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  205. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  206. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/test/__init__.py +0 -0
  207. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/test/client.py +0 -0
  208. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/tools/__init__.py +0 -0
  209. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/tools/create_type.py +0 -0
  210. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/tools/merge_types.py +0 -0
  211. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/__init__.py +0 -0
  212. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/base.py +0 -0
  213. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/cast.py +0 -0
  214. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/enum.py +0 -0
  215. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/execution.py +0 -0
  216. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/fields/__init__.py +0 -0
  217. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/graphql.py +0 -0
  218. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/info.py +0 -0
  219. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/mutation.py +0 -0
  220. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/nodes.py +0 -0
  221. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/object_type.py +0 -0
  222. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/private.py +0 -0
  223. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/scalar.py +0 -0
  224. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/types/unset.py +0 -0
  225. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/__init__.py +0 -0
  226. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/await_maybe.py +0 -0
  227. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/dataclasses.py +0 -0
  228. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/debug.py +0 -0
  229. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/deprecations.py +0 -0
  230. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/graphql_lexer.py +0 -0
  231. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/importer.py +0 -0
  232. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/inspect.py +0 -0
  233. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/logging.py +0 -0
  234. {strawberry_graphql-0.263.1 → strawberry_graphql-0.264.0}/strawberry/utils/str_converters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: strawberry-graphql
3
- Version: 0.263.1
3
+ Version: 0.264.0
4
4
  Summary: A library for creating GraphQL APIs
5
5
  License: MIT
6
6
  Keywords: graphql,api,rest,starlette,async
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "strawberry-graphql"
3
3
  packages = [ { include = "strawberry" } ]
4
- version = "0.263.1"
4
+ version = "0.264.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -56,7 +56,7 @@ rich = {version = ">=12.0.0", optional = true}
56
56
  pyinstrument = {version = ">=4.0.0", optional = true}
57
57
 
58
58
  [tool.poetry.group.dev.dependencies]
59
- ruff = "^0.11.1"
59
+ ruff = "^0.11.4"
60
60
  asgiref = "^3.2"
61
61
  email-validator = {version = ">=1.1.3,<3.0.0", optional = false}
62
62
  freezegun = "^1.2.1"
@@ -80,22 +80,22 @@ python-multipart = ">=0.0.7"
80
80
  rich = {version = ">=12.5.1", optional = false}
81
81
  sanic-testing = ">=22.9,<24.0"
82
82
  typer = {version = ">=0.7.0", optional = false}
83
- types-aiofiles = ">=22.1"
83
+ types-aiofiles = "^24.1.0.20250326"
84
84
  types-certifi = "^2021.10.8"
85
85
  types-chardet = "^5.0.4"
86
86
  types-freezegun = "^1.1.9"
87
87
  types-python-dateutil = "^2.8.19"
88
88
  types-toml = "^0.10.8"
89
89
  types-typed-ast = "^1.5.8"
90
- types-ujson = "^5.6.0"
91
- types-protobuf = "^4.23.0.1"
90
+ types-ujson = "^5.10.0.20250326"
91
+ types-protobuf = "^5.29.1.20250403"
92
92
  poetry-plugin-export = {version = "^1.6.0", python = "<4.0", optional = false}
93
93
  # another bug in poetry
94
94
  urllib3 = "<2"
95
95
  graphlib_backport = {version = "*", python = "<3.9", optional = false}
96
96
  inline-snapshot = "^0.10.1"
97
97
  types-deprecated = "^1.2.15.20241117"
98
- types-six = "^1.17.0.20241205"
98
+ types-six = "^1.17.0.20250403"
99
99
  types-pyyaml = "^6.0.12.20240917"
100
100
  mypy = "^1.15.0"
101
101
  codeflash = ">=0.9.2"
@@ -56,7 +56,7 @@ class AioHTTPRequestAdapter(AsyncHTTPRequestAdapter):
56
56
 
57
57
  @property
58
58
  def method(self) -> HTTPMethod:
59
- return cast(HTTPMethod, self.request.method.upper())
59
+ return cast("HTTPMethod", self.request.method.upper())
60
60
 
61
61
  @property
62
62
  def headers(self) -> Mapping[str, str]:
@@ -1,8 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
- import logging
4
3
  import sys
5
4
  import typing
5
+ import warnings
6
6
  from collections import abc
7
7
  from enum import Enum
8
8
  from typing import (
@@ -130,7 +130,7 @@ class StrawberryAnnotation:
130
130
  return self.__resolve_cache__
131
131
 
132
132
  def _resolve(self) -> Union[StrawberryType, type]:
133
- evaled_type = cast(Any, self.evaluate())
133
+ evaled_type = cast("Any", self.evaluate())
134
134
 
135
135
  if is_private(evaled_type):
136
136
  return evaled_type
@@ -158,7 +158,7 @@ class StrawberryAnnotation:
158
158
  if self._is_union(evaled_type, args):
159
159
  return self.create_union(evaled_type, args)
160
160
  if is_type_var(evaled_type) or evaled_type is Self:
161
- return self.create_type_var(cast(TypeVar, evaled_type))
161
+ return self.create_type_var(cast("TypeVar", evaled_type))
162
162
  if self._is_strawberry_type(evaled_type):
163
163
  # Simply return objects that are already StrawberryTypes
164
164
  return evaled_type
@@ -242,9 +242,12 @@ class StrawberryAnnotation:
242
242
 
243
243
  union_args = [arg for arg in args if isinstance(arg, StrawberryUnion)]
244
244
  if len(union_args) > 1:
245
- logging.warning(
246
- "Duplicate union definition detected. "
247
- "Only the first definition will be considered"
245
+ warnings.warn(
246
+ (
247
+ "Duplicate union definition detected. "
248
+ "Only the first definition will be considered"
249
+ ),
250
+ stacklevel=2,
248
251
  )
249
252
 
250
253
  if union_args:
@@ -60,7 +60,7 @@ class ASGIRequestAdapter(AsyncHTTPRequestAdapter):
60
60
 
61
61
  @property
62
62
  def method(self) -> HTTPMethod:
63
- return cast(HTTPMethod, self.request.method.upper())
63
+ return cast("HTTPMethod", self.request.method.upper())
64
64
 
65
65
  @property
66
66
  def headers(self) -> Mapping[str, str]:
@@ -7,7 +7,6 @@ from chalice.app import Request, Response
7
7
  from strawberry.http.exceptions import HTTPException
8
8
  from strawberry.http.sync_base_view import SyncBaseHTTPView, SyncHTTPRequestAdapter
9
9
  from strawberry.http.temporal_response import TemporalResponse
10
- from strawberry.http.types import HTTPMethod, QueryParams
11
10
  from strawberry.http.typevars import Context, RootValue
12
11
 
13
12
  if TYPE_CHECKING:
@@ -15,6 +14,7 @@ if TYPE_CHECKING:
15
14
 
16
15
  from strawberry.http import GraphQLHTTPResponse
17
16
  from strawberry.http.ides import GraphQL_IDE
17
+ from strawberry.http.types import HTTPMethod, QueryParams
18
18
  from strawberry.schema import BaseSchema
19
19
 
20
20
 
@@ -32,7 +32,7 @@ class ChaliceHTTPRequestAdapter(SyncHTTPRequestAdapter):
32
32
 
33
33
  @property
34
34
  def method(self) -> HTTPMethod:
35
- return cast(HTTPMethod, self.request.method.upper())
35
+ return cast("HTTPMethod", self.request.method.upper())
36
36
 
37
37
  @property
38
38
  def headers(self) -> Mapping[str, str]:
@@ -133,7 +133,7 @@ def codegen(
133
133
  console_plugin.before_any_start()
134
134
 
135
135
  for q in query:
136
- plugins = cast(list[QueryCodegenPlugin], _load_plugins(selected_plugins, q))
136
+ plugins = cast("list[QueryCodegenPlugin]", _load_plugins(selected_plugins, q))
137
137
 
138
138
  code_generator = QueryCodegen(
139
139
  schema_symbol, plugins=plugins, console_plugin=console_plugin
@@ -362,7 +362,7 @@ class QueryCodegen:
362
362
  # The FragmentDefinitionNode has a non-Optional `SelectionSetNode` but
363
363
  # the Protocol wants an `Optional[SelectionSetNode]` so this doesn't
364
364
  # quite conform.
365
- cast(HasSelectionSet, fd),
365
+ cast("HasSelectionSet", fd),
366
366
  parent_type=query_type,
367
367
  class_name=fd.name.value,
368
368
  graph_ql_object_type_factory=graph_ql_object_type_factory,
@@ -468,13 +468,13 @@ class QueryCodegen:
468
468
  result_class_name = f"{operation_name}Result"
469
469
 
470
470
  operation_type = self._collect_types(
471
- cast(HasSelectionSet, operation_definition),
471
+ cast("HasSelectionSet", operation_definition),
472
472
  parent_type=query_type,
473
473
  class_name=result_class_name,
474
474
  )
475
475
 
476
476
  operation_kind = cast(
477
- Literal["query", "mutation", "subscription"],
477
+ "Literal['query', 'mutation', 'subscription']",
478
478
  operation_definition.operation.value,
479
479
  )
480
480
 
@@ -801,7 +801,7 @@ class QueryCodegen:
801
801
  # `GraphQLField` or `GraphQLFragmentSpread`
802
802
  # and the suite above will cause this statement to be
803
803
  # skipped if there are any `GraphQLFragmentSpread`.
804
- current_type.fields = cast(list[GraphQLField], fields)
804
+ current_type.fields = cast("list[GraphQLField]", fields)
805
805
 
806
806
  self._collect_type(current_type)
807
807
 
@@ -854,7 +854,7 @@ class QueryCodegen:
854
854
  assert isinstance(sub_selection, FieldNode)
855
855
 
856
856
  parent_type = cast(
857
- StrawberryObjectDefinition,
857
+ "StrawberryObjectDefinition",
858
858
  self.schema.get_type_by_name(type_condition_name),
859
859
  )
860
860
 
@@ -889,7 +889,7 @@ class QueryCodegen:
889
889
  # `GraphQLField` or `GraphQLFragmentSpread`
890
890
  # and the suite above will cause this statement to be
891
891
  # skipped if there are any `GraphQLFragmentSpread`.
892
- current_type.fields.extend(cast(list[GraphQLField], fields))
892
+ current_type.fields.extend(cast("list[GraphQLField]", fields))
893
893
 
894
894
  sub_types.append(current_type)
895
895
 
@@ -83,7 +83,7 @@ class DjangoHTTPRequestAdapter(SyncHTTPRequestAdapter):
83
83
  def method(self) -> HTTPMethod:
84
84
  assert self.request.method is not None
85
85
 
86
- return cast(HTTPMethod, self.request.method.upper())
86
+ return cast("HTTPMethod", self.request.method.upper())
87
87
 
88
88
  @property
89
89
  def headers(self) -> Mapping[str, str]:
@@ -114,7 +114,7 @@ class AsyncDjangoHTTPRequestAdapter(AsyncHTTPRequestAdapter):
114
114
  def method(self) -> HTTPMethod:
115
115
  assert self.request.method is not None
116
116
 
117
- return cast(HTTPMethod, self.request.method.upper())
117
+ return cast("HTTPMethod", self.request.method.upper())
118
118
 
119
119
  @property
120
120
  def headers(self) -> Mapping[str, str]:
@@ -70,7 +70,7 @@ def strawberry_threading_exception_handler(
70
70
  # (we'd need to do type ignore for python 3.8 and above, but mypy
71
71
  # doesn't seem to be able to handle that and will complain in python 3.7)
72
72
 
73
- cast(Any, original_threading_exception_hook)(args)
73
+ cast("Any", original_threading_exception_hook)(args)
74
74
 
75
75
  return
76
76
 
@@ -35,7 +35,7 @@ def _convert_from_pydantic_to_strawberry_type(
35
35
  if hasattr(option_type, "_pydantic_type"):
36
36
  source_type = option_type._pydantic_type
37
37
  else:
38
- source_type = cast(type, option_type)
38
+ source_type = cast("type", option_type)
39
39
  if isinstance(data, source_type):
40
40
  return _convert_from_pydantic_to_strawberry_type(
41
41
  option_type, data_from_model=data, extra=extra
@@ -116,7 +116,7 @@ def error_type(
116
116
  ]
117
117
 
118
118
  wrapped: type[WithStrawberryObjectDefinition] = _wrap_dataclass(cls)
119
- extra_fields = cast(list[dataclasses.Field], _get_fields(wrapped, {}))
119
+ extra_fields = cast("list[dataclasses.Field]", _get_fields(wrapped, {}))
120
120
  private_fields = get_private_fields(wrapped)
121
121
 
122
122
  all_model_fields.extend(
@@ -180,7 +180,7 @@ def type( # noqa: PLR0915
180
180
 
181
181
  wrapped = _wrap_dataclass(cls)
182
182
  extra_strawberry_fields = _get_fields(wrapped, {})
183
- extra_fields = cast(list[dataclasses.Field], extra_strawberry_fields)
183
+ extra_fields = cast("list[dataclasses.Field]", extra_strawberry_fields)
184
184
  private_fields = get_private_fields(wrapped)
185
185
 
186
186
  extra_fields_dict = {field.name: field for field in extra_strawberry_fields}
@@ -65,7 +65,7 @@ try:
65
65
  from pydantic.mypy import METADATA_KEY as PYDANTIC_METADATA_KEY
66
66
  from pydantic.mypy import PydanticModelField
67
67
 
68
- PYDANTIC_VERSION = tuple(map(int, pydantic.__version__.split(".")))
68
+ PYDANTIC_VERSION = tuple(map(int, pydantic.__version__.split("."))) # noqa: RUF048
69
69
 
70
70
  from strawberry.experimental.pydantic._compat import IS_PYDANTIC_V1
71
71
  except ImportError:
@@ -397,7 +397,7 @@ def strawberry_pydantic_class_callback(ctx: ClassDefContext) -> None:
397
397
  ]
398
398
  add_method(ctx, "__init__", init_args, NoneType())
399
399
 
400
- model_type = cast(Instance, _get_type_for_expr(model_expression, ctx.api))
400
+ model_type = cast("Instance", _get_type_for_expr(model_expression, ctx.api))
401
401
 
402
402
  # these are the fields that the user added to the strawberry type
403
403
  new_strawberry_fields: set[str] = set()
@@ -405,7 +405,7 @@ def strawberry_pydantic_class_callback(ctx: ClassDefContext) -> None:
405
405
  # TODO: think about inheritance for strawberry?
406
406
  for stmt in ctx.cls.defs.body:
407
407
  if isinstance(stmt, AssignmentStmt):
408
- lhs = cast(NameExpr, stmt.lvalues[0])
408
+ lhs = cast("NameExpr", stmt.lvalues[0])
409
409
  new_strawberry_fields.add(lhs.name)
410
410
 
411
411
  pydantic_fields: set[PydanticModelField] = set()
@@ -76,7 +76,7 @@ class GraphQLRouter(
76
76
  connection: HTTPConnection,
77
77
  response: Response = None, # type: ignore
78
78
  ) -> MergedContext:
79
- request = cast(Union[Request, WebSocket], connection)
79
+ request = cast("Union[Request, WebSocket]", connection)
80
80
  if isinstance(custom_context, BaseContext):
81
81
  custom_context.request = request
82
82
  custom_context.background_tasks = background_tasks
@@ -158,7 +158,7 @@ class Schema(BaseSchema):
158
158
  type_name = representation.pop("__typename")
159
159
  type_ = self.schema_converter.type_map[type_name]
160
160
 
161
- definition = cast(StrawberryObjectDefinition, type_.definition)
161
+ definition = cast("StrawberryObjectDefinition", type_.definition)
162
162
 
163
163
  if hasattr(definition.origin, "resolve_reference"):
164
164
  resolve_reference = definition.origin.resolve_reference
@@ -45,7 +45,7 @@ class FlaskHTTPRequestAdapter(SyncHTTPRequestAdapter):
45
45
 
46
46
  @property
47
47
  def method(self) -> HTTPMethod:
48
- return cast(HTTPMethod, self.request.method.upper())
48
+ return cast("HTTPMethod", self.request.method.upper())
49
49
 
50
50
  @property
51
51
  def headers(self) -> Mapping[str, str]:
@@ -139,7 +139,7 @@ class AsyncFlaskHTTPRequestAdapter(AsyncHTTPRequestAdapter):
139
139
 
140
140
  @property
141
141
  def method(self) -> HTTPMethod:
142
- return cast(HTTPMethod, self.request.method.upper())
142
+ return cast("HTTPMethod", self.request.method.upper())
143
143
 
144
144
  @property
145
145
  def content_type(self) -> Optional[str]:
@@ -306,7 +306,7 @@ class AsyncBaseHTTPView(
306
306
  await websocket.close(4406, "Subprotocol not acceptable")
307
307
 
308
308
  return websocket_response
309
- request = cast(Request, request)
309
+ request = cast("Request", request)
310
310
 
311
311
  request_adapter = self.request_adapter_class(request)
312
312
  sub_response = await self.get_sub_response(request)
@@ -163,7 +163,7 @@ class LitestarRequestAdapter(AsyncHTTPRequestAdapter):
163
163
 
164
164
  @property
165
165
  def method(self) -> HTTPMethod:
166
- return cast(HTTPMethod, self.request.method.upper())
166
+ return cast("HTTPMethod", self.request.method.upper())
167
167
 
168
168
  @property
169
169
  def headers(self) -> Mapping[str, str]:
@@ -151,7 +151,7 @@ def print_schema_directive(
151
151
  directive: Any, schema: BaseSchema, *, extras: PrintExtras
152
152
  ) -> str:
153
153
  strawberry_directive = cast(
154
- StrawberrySchemaDirective, directive.__class__.__strawberry_directive__
154
+ "StrawberrySchemaDirective", directive.__class__.__strawberry_directive__
155
155
  )
156
156
  schema_converter = schema.schema_converter
157
157
  gql_directive = schema_converter.from_schema_directive(directive.__class__)
@@ -178,13 +178,13 @@ def print_schema_directive(
178
178
  f_type = f_type.of_type
179
179
 
180
180
  if has_object_definition(f_type):
181
- extras.types.add(cast(type, f_type))
181
+ extras.types.add(cast("type", f_type))
182
182
 
183
183
  if hasattr(f_type, "_scalar_definition"):
184
- extras.types.add(cast(type, f_type))
184
+ extras.types.add(cast("type", f_type))
185
185
 
186
186
  if isinstance(f_type, EnumDefinition):
187
- extras.types.add(cast(type, f_type))
187
+ extras.types.add(cast("type", f_type))
188
188
 
189
189
  return f" @{gql_directive.name}{params}"
190
190
 
@@ -363,7 +363,7 @@ def print_extends(type_: GraphQLObjectType, schema: BaseSchema) -> str:
363
363
  from strawberry.schema.schema_converter import GraphQLCoreConverter
364
364
 
365
365
  strawberry_type = cast(
366
- Optional[StrawberryObjectDefinition],
366
+ "Optional[StrawberryObjectDefinition]",
367
367
  type_.extensions
368
368
  and type_.extensions.get(GraphQLCoreConverter.DEFINITION_BACKREF),
369
369
  )
@@ -380,7 +380,7 @@ def print_type_directives(
380
380
  from strawberry.schema.schema_converter import GraphQLCoreConverter
381
381
 
382
382
  strawberry_type = cast(
383
- Optional[StrawberryObjectDefinition],
383
+ "Optional[StrawberryObjectDefinition]",
384
384
  type_.extensions
385
385
  and type_.extensions.get(GraphQLCoreConverter.DEFINITION_BACKREF),
386
386
  )
@@ -594,7 +594,7 @@ def is_builtin_directive(directive: GraphQLDirective) -> bool:
594
594
 
595
595
  def print_schema(schema: BaseSchema) -> str:
596
596
  graphql_core_schema = cast(
597
- GraphQLSchema,
597
+ "GraphQLSchema",
598
598
  schema._schema, # type: ignore
599
599
  )
600
600
  extras = PrintExtras()
@@ -27,7 +27,7 @@ class QuartHTTPRequestAdapter(AsyncHTTPRequestAdapter):
27
27
 
28
28
  @property
29
29
  def method(self) -> HTTPMethod:
30
- return cast(HTTPMethod, self.request.method.upper())
30
+ return cast("HTTPMethod", self.request.method.upper())
31
31
 
32
32
  @property
33
33
  def content_type(self) -> Optional[str]:
@@ -1,6 +1,5 @@
1
1
  from __future__ import annotations
2
2
 
3
- from collections.abc import Callable
4
3
  from functools import cached_property
5
4
  from typing import TYPE_CHECKING, Optional, cast
6
5
 
@@ -8,6 +7,8 @@ from strawberry.exceptions.exception import StrawberryException
8
7
  from strawberry.exceptions.utils.source_finder import SourceFinder
9
8
 
10
9
  if TYPE_CHECKING:
10
+ from collections.abc import Callable
11
+
11
12
  from strawberry.exceptions.exception_source import ExceptionSource
12
13
  from strawberry.types.fields.resolver import StrawberryResolver
13
14
 
@@ -101,7 +102,7 @@ class RelayWrongResolverAnnotationError(StrawberryException):
101
102
  return None # pragma: no cover
102
103
 
103
104
  source_finder = SourceFinder()
104
- return source_finder.find_function_from_object(cast(Callable, self.function))
105
+ return source_finder.find_function_from_object(cast("Callable", self.function))
105
106
 
106
107
 
107
108
  __all__ = [
@@ -108,7 +108,7 @@ class NodeExtension(FieldExtension):
108
108
 
109
109
  return resolve()
110
110
 
111
- return cast(Node, strawberry_cast(node_type, resolved_node))
111
+ return cast("Node", strawberry_cast(node_type, resolved_node))
112
112
 
113
113
  return resolver
114
114
 
@@ -161,7 +161,7 @@ class NodeExtension(FieldExtension):
161
161
  # we could end up resolving to a different type in case more than one
162
162
  # are registered
163
163
  def cast_nodes(node_t: type[Node], nodes: Iterable[Any]) -> list[Node]:
164
- return [cast(Node, strawberry_cast(node_t, node)) for node in nodes]
164
+ return [cast("Node", strawberry_cast(node_t, node)) for node in nodes]
165
165
 
166
166
  if awaitable_nodes or asyncgen_nodes:
167
167
 
@@ -196,7 +196,7 @@ class NodeExtension(FieldExtension):
196
196
 
197
197
  # Resolve any generator to lists
198
198
  resolved = {
199
- node_t: cast_nodes(node_t, cast(Iterable[Node], nodes))
199
+ node_t: cast_nodes(node_t, cast("Iterable[Node]", nodes))
200
200
  for node_t, nodes in resolved_nodes.items()
201
201
  }
202
202
  return [resolved[index_map[gid][0]][index_map[gid][1]] for gid in ids]
@@ -264,7 +264,7 @@ class ConnectionExtension(FieldExtension):
264
264
  type_origin = get_origin(f_type) if is_generic_alias(f_type) else f_type
265
265
 
266
266
  if not isinstance(type_origin, type) or not issubclass(type_origin, Connection):
267
- raise RelayWrongAnnotationError(field.name, cast(type, field.origin))
267
+ raise RelayWrongAnnotationError(field.name, cast("type", field.origin))
268
268
 
269
269
  assert field.base_resolver
270
270
  # TODO: We are not using resolver_type.type because it will call
@@ -294,7 +294,7 @@ class ConnectionExtension(FieldExtension):
294
294
  ):
295
295
  raise RelayWrongResolverAnnotationError(field.name, field.base_resolver)
296
296
 
297
- self.connection_type = cast(type[Connection[Node]], f_type)
297
+ self.connection_type = cast("type[Connection[Node]]", f_type)
298
298
 
299
299
  def resolve(
300
300
  self,
@@ -310,7 +310,7 @@ class ConnectionExtension(FieldExtension):
310
310
  ) -> Any:
311
311
  assert self.connection_type is not None
312
312
  return self.connection_type.resolve_connection(
313
- cast(Iterable[Node], next_(source, info, **kwargs)),
313
+ cast("Iterable[Node]", next_(source, info, **kwargs)),
314
314
  info=info,
315
315
  before=before,
316
316
  after=after,
@@ -339,7 +339,7 @@ class ConnectionExtension(FieldExtension):
339
339
  nodes = await nodes
340
340
 
341
341
  resolved = self.connection_type.resolve_connection(
342
- cast(Iterable[Node], nodes),
342
+ cast("Iterable[Node]", nodes),
343
343
  info=info,
344
344
  before=before,
345
345
  after=after,