strawberry-graphql 0.254.0__tar.gz → 0.255.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 (235) hide show
  1. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/pyproject.toml +5 -1
  3. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/annotation.py +1 -1
  4. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/async_base_view.py +16 -7
  5. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/typevars.py +5 -5
  6. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/relay/fields.py +23 -41
  7. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/subscribe.py +1 -1
  8. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +13 -8
  9. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +12 -4
  10. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/LICENSE +0 -0
  11. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/README.md +0 -0
  12. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/__init__.py +0 -0
  13. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/__main__.py +0 -0
  14. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/aiohttp/__init__.py +0 -0
  15. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/aiohttp/test/__init__.py +0 -0
  16. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/aiohttp/test/client.py +0 -0
  17. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/aiohttp/views.py +0 -0
  18. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/asgi/__init__.py +0 -0
  19. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/asgi/test/__init__.py +0 -0
  20. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/asgi/test/client.py +0 -0
  21. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/chalice/__init__.py +0 -0
  22. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/chalice/views.py +0 -0
  23. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/__init__.py +0 -0
  24. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/handlers/__init__.py +0 -0
  25. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/handlers/base.py +0 -0
  26. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/handlers/http_handler.py +0 -0
  27. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/handlers/ws_handler.py +0 -0
  28. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/router.py +0 -0
  29. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/channels/testing.py +0 -0
  30. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/__init__.py +0 -0
  31. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/app.py +0 -0
  32. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/__init__.py +0 -0
  33. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/codegen.py +0 -0
  34. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/export_schema.py +0 -0
  35. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/schema_codegen.py +0 -0
  36. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/server.py +0 -0
  37. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  38. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  39. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  40. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/constants.py +0 -0
  41. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/debug_server.py +0 -0
  42. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/utils/__init__.py +0 -0
  43. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/cli/utils/load_schema.py +0 -0
  44. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/__init__.py +0 -0
  45. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/exceptions.py +0 -0
  46. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/plugins/__init__.py +0 -0
  47. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  48. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/plugins/python.py +0 -0
  49. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/plugins/typescript.py +0 -0
  50. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/query_codegen.py +0 -0
  51. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codegen/types.py +0 -0
  52. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codemods/__init__.py +0 -0
  53. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codemods/annotated_unions.py +0 -0
  54. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/codemods/update_imports.py +0 -0
  55. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/dataloader.py +0 -0
  56. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/directive.py +0 -0
  57. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/__init__.py +0 -0
  58. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/apps.py +0 -0
  59. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/context.py +0 -0
  60. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/test/__init__.py +0 -0
  61. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/test/client.py +0 -0
  62. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/django/views.py +0 -0
  63. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/__init__.py +0 -0
  64. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
  65. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
  66. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/exception.py +0 -0
  67. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/exception_source.py +0 -0
  68. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/handler.py +0 -0
  69. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
  70. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  71. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  72. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/missing_dependencies.py +0 -0
  73. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
  74. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
  75. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  76. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  77. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
  78. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
  79. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
  80. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/syntax.py +0 -0
  81. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
  82. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/utils/__init__.py +0 -0
  83. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  84. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/__init__.py +0 -0
  85. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  86. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/_compat.py +0 -0
  87. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/conversion.py +0 -0
  88. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  89. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/error_type.py +0 -0
  90. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
  91. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/fields.py +0 -0
  92. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/object_type.py +0 -0
  93. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/experimental/pydantic/utils.py +0 -0
  94. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/LICENSE +0 -0
  95. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/__init__.py +0 -0
  96. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  97. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  98. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  99. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/ext/mypy_plugin.py +0 -0
  100. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/__init__.py +0 -0
  101. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/add_validation_rules.py +0 -0
  102. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/base_extension.py +0 -0
  103. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/context.py +0 -0
  104. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/directives.py +0 -0
  105. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/disable_validation.py +0 -0
  106. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/field_extension.py +0 -0
  107. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/mask_errors.py +0 -0
  108. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/max_aliases.py +0 -0
  109. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/max_tokens.py +0 -0
  110. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/parser_cache.py +0 -0
  111. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/pyinstrument.py +0 -0
  112. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/query_depth_limiter.py +0 -0
  113. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/runner.py +0 -0
  114. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/tracing/__init__.py +0 -0
  115. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/tracing/apollo.py +0 -0
  116. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/tracing/datadog.py +0 -0
  117. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  118. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/tracing/utils.py +0 -0
  119. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/utils.py +0 -0
  120. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/extensions/validation_cache.py +0 -0
  121. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/fastapi/__init__.py +0 -0
  122. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/fastapi/context.py +0 -0
  123. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/fastapi/router.py +0 -0
  124. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/__init__.py +0 -0
  125. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/argument.py +0 -0
  126. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/enum.py +0 -0
  127. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/field.py +0 -0
  128. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/mutation.py +0 -0
  129. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/object_type.py +0 -0
  130. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/scalar.py +0 -0
  131. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/schema.py +0 -0
  132. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/schema_directive.py +0 -0
  133. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/schema_directives.py +0 -0
  134. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/types.py +0 -0
  135. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/federation/union.py +0 -0
  136. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/field_extensions/__init__.py +0 -0
  137. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/field_extensions/input_mutation.py +0 -0
  138. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/file_uploads/__init__.py +0 -0
  139. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/file_uploads/scalars.py +0 -0
  140. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/file_uploads/utils.py +0 -0
  141. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/flask/__init__.py +0 -0
  142. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/flask/views.py +0 -0
  143. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/__init__.py +0 -0
  144. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/base.py +0 -0
  145. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/exceptions.py +0 -0
  146. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/ides.py +0 -0
  147. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/parse_content_type.py +0 -0
  148. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/sync_base_view.py +0 -0
  149. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/temporal_response.py +0 -0
  150. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/http/types.py +0 -0
  151. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/litestar/__init__.py +0 -0
  152. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/litestar/controller.py +0 -0
  153. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/parent.py +0 -0
  154. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/permission.py +0 -0
  155. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/printer/__init__.py +0 -0
  156. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/printer/ast_from_value.py +0 -0
  157. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/printer/printer.py +0 -0
  158. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/py.typed +0 -0
  159. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/quart/__init__.py +0 -0
  160. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/quart/views.py +0 -0
  161. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/relay/__init__.py +0 -0
  162. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/relay/exceptions.py +0 -0
  163. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/relay/types.py +0 -0
  164. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/relay/utils.py +0 -0
  165. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/resolvers.py +0 -0
  166. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/sanic/__init__.py +0 -0
  167. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/sanic/context.py +0 -0
  168. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/sanic/utils.py +0 -0
  169. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/sanic/views.py +0 -0
  170. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/scalars.py +0 -0
  171. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/__init__.py +0 -0
  172. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/base.py +0 -0
  173. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/compat.py +0 -0
  174. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/config.py +0 -0
  175. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/exceptions.py +0 -0
  176. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/execute.py +0 -0
  177. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/name_converter.py +0 -0
  178. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/schema.py +0 -0
  179. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/schema_converter.py +0 -0
  180. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/types/__init__.py +0 -0
  181. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/types/base_scalars.py +0 -0
  182. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/types/concrete_type.py +0 -0
  183. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/types/scalar.py +0 -0
  184. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/validation_rules/__init__.py +0 -0
  185. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema/validation_rules/one_of.py +0 -0
  186. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema_codegen/__init__.py +0 -0
  187. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema_directive.py +0 -0
  188. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/schema_directives.py +0 -0
  189. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/static/apollo-sandbox.html +0 -0
  190. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/static/graphiql.html +0 -0
  191. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/static/pathfinder.html +0 -0
  192. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/__init__.py +0 -0
  193. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  194. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  195. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  196. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  197. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  198. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/test/__init__.py +0 -0
  199. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/test/client.py +0 -0
  200. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/tools/__init__.py +0 -0
  201. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/tools/create_type.py +0 -0
  202. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/tools/merge_types.py +0 -0
  203. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/__init__.py +0 -0
  204. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/arguments.py +0 -0
  205. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/auto.py +0 -0
  206. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/base.py +0 -0
  207. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/enum.py +0 -0
  208. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/execution.py +0 -0
  209. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/field.py +0 -0
  210. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/fields/__init__.py +0 -0
  211. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/fields/resolver.py +0 -0
  212. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/graphql.py +0 -0
  213. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/info.py +0 -0
  214. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/lazy_type.py +0 -0
  215. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/mutation.py +0 -0
  216. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/nodes.py +0 -0
  217. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/object_type.py +0 -0
  218. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/private.py +0 -0
  219. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/scalar.py +0 -0
  220. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/type_resolver.py +0 -0
  221. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/union.py +0 -0
  222. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/types/unset.py +0 -0
  223. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/__init__.py +0 -0
  224. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/aio.py +0 -0
  225. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/await_maybe.py +0 -0
  226. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/dataclasses.py +0 -0
  227. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/debug.py +0 -0
  228. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/deprecations.py +0 -0
  229. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/graphql_lexer.py +0 -0
  230. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/importer.py +0 -0
  231. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/inspect.py +0 -0
  232. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/logging.py +0 -0
  233. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/operation.py +0 -0
  234. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.0}/strawberry/utils/str_converters.py +0 -0
  235. {strawberry_graphql-0.254.0 → strawberry_graphql-0.255.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.254.0
3
+ Version: 0.255.0
4
4
  Summary: A library for creating GraphQL APIs
5
5
  Home-page: https://strawberry.rocks/
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "strawberry-graphql"
3
3
  packages = [ { include = "strawberry" } ]
4
- version = "0.254.0"
4
+ version = "0.255.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -100,6 +100,10 @@ poetry-plugin-export = "^1.6.0"
100
100
  urllib3 = "<2"
101
101
  graphlib_backport = {version = "*", python = "<3.9", optional = false}
102
102
  inline-snapshot = "^0.10.1"
103
+ types-deprecated = "^1.2.15.20241117"
104
+ types-six = "^1.17.0.20241205"
105
+ types-pyyaml = "^6.0.12.20240917"
106
+ mypy = "^1.13.0"
103
107
 
104
108
  [tool.poetry.group.integrations]
105
109
  optional = true
@@ -208,7 +208,7 @@ class StrawberryAnnotation:
208
208
  )
209
209
 
210
210
  # Note that passing a single type to `Union` is equivalent to not using `Union`
211
- # at all. This allows us to not di any checks for how many types have been
211
+ # at all. This allows us to not do any checks for how many types have been
212
212
  # passed as we can safely use `Union` for both optional types
213
213
  # (e.g. `Optional[str]`) and optional unions (e.g.
214
214
  # `Optional[Union[TypeA, TypeB]]`)
@@ -13,6 +13,7 @@ from typing import (
13
13
  Mapping,
14
14
  Optional,
15
15
  Tuple,
16
+ Type,
16
17
  Union,
17
18
  cast,
18
19
  overload,
@@ -116,11 +117,19 @@ class AsyncBaseHTTPView(
116
117
  connection_init_wait_timeout: timedelta = timedelta(minutes=1)
117
118
  request_adapter_class: Callable[[Request], AsyncHTTPRequestAdapter]
118
119
  websocket_adapter_class: Callable[
119
- ["AsyncBaseHTTPView", WebSocketRequest, WebSocketResponse],
120
+ [
121
+ "AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue]",
122
+ WebSocketRequest,
123
+ WebSocketResponse,
124
+ ],
120
125
  AsyncWebSocketAdapter,
121
126
  ]
122
- graphql_transport_ws_handler_class = BaseGraphQLTransportWSHandler
123
- graphql_ws_handler_class = BaseGraphQLWSHandler
127
+ graphql_transport_ws_handler_class: Type[
128
+ BaseGraphQLTransportWSHandler[Context, RootValue]
129
+ ] = BaseGraphQLTransportWSHandler[Context, RootValue]
130
+ graphql_ws_handler_class: Type[BaseGraphQLWSHandler[Context, RootValue]] = (
131
+ BaseGraphQLWSHandler[Context, RootValue]
132
+ )
124
133
 
125
134
  @property
126
135
  @abc.abstractmethod
@@ -281,8 +290,8 @@ class AsyncBaseHTTPView(
281
290
  await self.graphql_transport_ws_handler_class(
282
291
  view=self,
283
292
  websocket=websocket,
284
- context=context,
285
- root_value=root_value,
293
+ context=context, # type: ignore
294
+ root_value=root_value, # type: ignore
286
295
  schema=self.schema,
287
296
  debug=self.debug,
288
297
  connection_init_wait_timeout=self.connection_init_wait_timeout,
@@ -291,8 +300,8 @@ class AsyncBaseHTTPView(
291
300
  await self.graphql_ws_handler_class(
292
301
  view=self,
293
302
  websocket=websocket,
294
- context=context,
295
- root_value=root_value,
303
+ context=context, # type: ignore
304
+ root_value=root_value, # type: ignore
296
305
  schema=self.schema,
297
306
  debug=self.debug,
298
307
  keep_alive=self.keep_alive,
@@ -1,20 +1,20 @@
1
- from typing import TypeVar
1
+ from typing_extensions import TypeVar
2
2
 
3
3
  Request = TypeVar("Request", contravariant=True)
4
4
  Response = TypeVar("Response")
5
5
  SubResponse = TypeVar("SubResponse")
6
6
  WebSocketRequest = TypeVar("WebSocketRequest")
7
7
  WebSocketResponse = TypeVar("WebSocketResponse")
8
- Context = TypeVar("Context")
9
- RootValue = TypeVar("RootValue")
8
+ Context = TypeVar("Context", default=None)
9
+ RootValue = TypeVar("RootValue", default=None)
10
10
 
11
11
 
12
12
  __all__ = [
13
+ "Context",
13
14
  "Request",
14
15
  "Response",
16
+ "RootValue",
15
17
  "SubResponse",
16
18
  "WebSocketRequest",
17
19
  "WebSocketResponse",
18
- "Context",
19
- "RootValue",
20
20
  ]
@@ -24,9 +24,8 @@ from typing import (
24
24
  Type,
25
25
  Union,
26
26
  cast,
27
- overload,
28
27
  )
29
- from typing_extensions import Annotated, get_origin
28
+ from typing_extensions import Annotated, get_args, get_origin
30
29
 
31
30
  from strawberry.annotation import StrawberryAnnotation
32
31
  from strawberry.extensions.field_extension import (
@@ -44,9 +43,9 @@ from strawberry.types.field import _RESOLVER_TYPE, StrawberryField, field
44
43
  from strawberry.types.fields.resolver import StrawberryResolver
45
44
  from strawberry.types.lazy_type import LazyType
46
45
  from strawberry.utils.aio import asyncgen_to_list
47
- from strawberry.utils.typing import eval_type, is_generic_alias
46
+ from strawberry.utils.typing import eval_type, is_generic_alias, is_optional, is_union
48
47
 
49
- from .types import Connection, GlobalID, Node, NodeIterableType, NodeType
48
+ from .types import Connection, GlobalID, Node
50
49
 
51
50
  if TYPE_CHECKING:
52
51
  from typing_extensions import Literal
@@ -233,7 +232,11 @@ class ConnectionExtension(FieldExtension):
233
232
  f_type = f_type.resolve_type()
234
233
  field.type = f_type
235
234
 
235
+ if isinstance(f_type, StrawberryOptional):
236
+ f_type = f_type.of_type
237
+
236
238
  type_origin = get_origin(f_type) if is_generic_alias(f_type) else f_type
239
+
237
240
  if not isinstance(type_origin, type) or not issubclass(type_origin, Connection):
238
241
  raise RelayWrongAnnotationError(field.name, cast(type, field.origin))
239
242
 
@@ -253,13 +256,19 @@ class ConnectionExtension(FieldExtension):
253
256
  None,
254
257
  )
255
258
 
259
+ if is_union(resolver_type):
260
+ assert is_optional(resolver_type)
261
+
262
+ resolver_type = get_args(resolver_type)[0]
263
+
256
264
  origin = get_origin(resolver_type)
265
+
257
266
  if origin is None or not issubclass(
258
267
  origin, (Iterator, Iterable, AsyncIterator, AsyncIterable)
259
268
  ):
260
269
  raise RelayWrongResolverAnnotationError(field.name, field.base_resolver)
261
270
 
262
- self.connection_type = cast(Type[Connection[Node]], field.type)
271
+ self.connection_type = cast(Type[Connection[Node]], f_type)
263
272
 
264
273
  def resolve(
265
274
  self,
@@ -327,44 +336,17 @@ else:
327
336
  return field(*args, **kwargs)
328
337
 
329
338
 
330
- @overload
331
- def connection(
332
- graphql_type: Optional[Type[Connection[NodeType]]] = None,
333
- *,
334
- resolver: Optional[_RESOLVER_TYPE[NodeIterableType[Any]]] = None,
335
- name: Optional[str] = None,
336
- is_subscription: bool = False,
337
- description: Optional[str] = None,
338
- init: Literal[True] = True,
339
- permission_classes: Optional[List[Type[BasePermission]]] = None,
340
- deprecation_reason: Optional[str] = None,
341
- default: Any = dataclasses.MISSING,
342
- default_factory: Union[Callable[..., object], object] = dataclasses.MISSING,
343
- metadata: Optional[Mapping[Any, Any]] = None,
344
- directives: Optional[Sequence[object]] = (),
345
- extensions: List[FieldExtension] = (), # type: ignore
346
- ) -> Any: ...
347
-
348
-
349
- @overload
350
- def connection(
351
- graphql_type: Optional[Type[Connection[NodeType]]] = None,
352
- *,
353
- name: Optional[str] = None,
354
- is_subscription: bool = False,
355
- description: Optional[str] = None,
356
- permission_classes: Optional[List[Type[BasePermission]]] = None,
357
- deprecation_reason: Optional[str] = None,
358
- default: Any = dataclasses.MISSING,
359
- default_factory: Union[Callable[..., object], object] = dataclasses.MISSING,
360
- metadata: Optional[Mapping[Any, Any]] = None,
361
- directives: Optional[Sequence[object]] = (),
362
- extensions: List[FieldExtension] = (), # type: ignore
363
- ) -> StrawberryField: ...
339
+ # we used to have `Type[Connection[NodeType]]` here, but that when we added
340
+ # support for making the Connection type optional, we had to change it to
341
+ # `Any` because otherwise it wouldn't be type check since `Optional[Connection[Something]]`
342
+ # is not a `Type`, but a special form, see https://discuss.python.org/t/is-annotated-compatible-with-type-t/43898/46
343
+ # for more information, and also https://peps.python.org/pep-0747/, which is currently
344
+ # in draft status (and no type checker supports it yet)
345
+ ConnectionGraphQLType = Any
364
346
 
365
347
 
366
348
  def connection(
367
- graphql_type: Optional[Type[Connection[NodeType]]] = None,
349
+ graphql_type: Optional[ConnectionGraphQLType] = None,
368
350
  *,
369
351
  resolver: Optional[_RESOLVER_TYPE[Any]] = None,
370
352
  name: Optional[str] = None,
@@ -379,7 +361,7 @@ def connection(
379
361
  extensions: List[FieldExtension] = (), # type: ignore
380
362
  # This init parameter is used by pyright to determine whether this field
381
363
  # is added in the constructor or not. It is not used to change
382
- # any behavior at the moment.
364
+ # any behaviour at the moment.
383
365
  init: Literal[True, False, None] = None,
384
366
  ) -> Any:
385
367
  """Annotate a property or a method to create a relay connection field.
@@ -138,7 +138,7 @@ async def subscribe(
138
138
  middleware_manager,
139
139
  execution_context_class,
140
140
  )
141
- # GrapQL-core might return an initial error result instead of an async iterator.
141
+ # GraphQL-core might return an initial error result instead of an async iterator.
142
142
  # This happens when "there was an immediate error" i.e resolver is not an async iterator.
143
143
  # To overcome this while maintaining the extension contexts we do this trick.
144
144
  first = await asyncgen.__anext__()
@@ -5,8 +5,10 @@ import logging
5
5
  from contextlib import suppress
6
6
  from typing import (
7
7
  TYPE_CHECKING,
8
+ Any,
8
9
  Awaitable,
9
10
  Dict,
11
+ Generic,
10
12
  List,
11
13
  Optional,
12
14
  cast,
@@ -20,6 +22,7 @@ from strawberry.http.exceptions import (
20
22
  NonTextMessageReceived,
21
23
  WebSocketDisconnected,
22
24
  )
25
+ from strawberry.http.typevars import Context, RootValue
23
26
  from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
24
27
  CompleteMessage,
25
28
  ConnectionInitMessage,
@@ -44,15 +47,15 @@ if TYPE_CHECKING:
44
47
  from strawberry.schema.subscribe import SubscriptionResult
45
48
 
46
49
 
47
- class BaseGraphQLTransportWSHandler:
50
+ class BaseGraphQLTransportWSHandler(Generic[Context, RootValue]):
48
51
  task_logger: logging.Logger = logging.getLogger("strawberry.ws.task")
49
52
 
50
53
  def __init__(
51
54
  self,
52
- view: AsyncBaseHTTPView,
55
+ view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
53
56
  websocket: AsyncWebSocketAdapter,
54
- context: object,
55
- root_value: object,
57
+ context: Context,
58
+ root_value: RootValue,
56
59
  schema: BaseSchema,
57
60
  debug: bool,
58
61
  connection_init_wait_timeout: timedelta,
@@ -68,7 +71,7 @@ class BaseGraphQLTransportWSHandler:
68
71
  self.connection_init_received = False
69
72
  self.connection_acknowledged = False
70
73
  self.connection_timed_out = False
71
- self.operations: Dict[str, Operation] = {}
74
+ self.operations: Dict[str, Operation[Context, RootValue]] = {}
72
75
  self.completed_tasks: List[asyncio.Task] = []
73
76
 
74
77
  async def handle(self) -> None:
@@ -184,6 +187,8 @@ class BaseGraphQLTransportWSHandler:
184
187
  elif hasattr(self.context, "connection_params"):
185
188
  self.context.connection_params = payload
186
189
 
190
+ self.context = cast(Context, self.context)
191
+
187
192
  try:
188
193
  connection_ack_payload = await self.view.on_ws_connect(self.context)
189
194
  except ConnectionRejectionError:
@@ -250,7 +255,7 @@ class BaseGraphQLTransportWSHandler:
250
255
  operation.task = asyncio.create_task(self.run_operation(operation))
251
256
  self.operations[message["id"]] = operation
252
257
 
253
- async def run_operation(self, operation: Operation) -> None:
258
+ async def run_operation(self, operation: Operation[Context, RootValue]) -> None:
254
259
  """The operation task's top level method. Cleans-up and de-registers the operation once it is done."""
255
260
  # TODO: Handle errors in this method using self.handle_task_exception()
256
261
 
@@ -334,7 +339,7 @@ class BaseGraphQLTransportWSHandler:
334
339
  await task
335
340
 
336
341
 
337
- class Operation:
342
+ class Operation(Generic[Context, RootValue]):
338
343
  """A class encapsulating a single operation with its id. Helps enforce protocol state transition."""
339
344
 
340
345
  __slots__ = [
@@ -350,7 +355,7 @@ class Operation:
350
355
 
351
356
  def __init__(
352
357
  self,
353
- handler: BaseGraphQLTransportWSHandler,
358
+ handler: BaseGraphQLTransportWSHandler[Context, RootValue],
354
359
  id: str,
355
360
  operation_type: OperationType,
356
361
  query: str,
@@ -4,14 +4,17 @@ import asyncio
4
4
  from contextlib import suppress
5
5
  from typing import (
6
6
  TYPE_CHECKING,
7
+ Any,
7
8
  AsyncGenerator,
8
9
  Dict,
10
+ Generic,
9
11
  Optional,
10
12
  cast,
11
13
  )
12
14
 
13
15
  from strawberry.exceptions import ConnectionRejectionError
14
16
  from strawberry.http.exceptions import NonTextMessageReceived, WebSocketDisconnected
17
+ from strawberry.http.typevars import Context, RootValue
15
18
  from strawberry.subscriptions.protocols.graphql_ws.types import (
16
19
  ConnectionInitMessage,
17
20
  ConnectionTerminateMessage,
@@ -29,13 +32,16 @@ if TYPE_CHECKING:
29
32
  from strawberry.schema import BaseSchema
30
33
 
31
34
 
32
- class BaseGraphQLWSHandler:
35
+ class BaseGraphQLWSHandler(Generic[Context, RootValue]):
36
+ context: Context
37
+ root_value: RootValue
38
+
33
39
  def __init__(
34
40
  self,
35
- view: AsyncBaseHTTPView,
41
+ view: AsyncBaseHTTPView[Any, Any, Any, Any, Any, Context, RootValue],
36
42
  websocket: AsyncWebSocketAdapter,
37
- context: object,
38
- root_value: object,
43
+ context: Context,
44
+ root_value: RootValue,
39
45
  schema: BaseSchema,
40
46
  debug: bool,
41
47
  keep_alive: bool,
@@ -100,6 +106,8 @@ class BaseGraphQLWSHandler:
100
106
  elif hasattr(self.context, "connection_params"):
101
107
  self.context.connection_params = payload
102
108
 
109
+ self.context = cast(Context, self.context)
110
+
103
111
  try:
104
112
  connection_ack_payload = await self.view.on_ws_connect(self.context)
105
113
  except ConnectionRejectionError as e: