strawberry-graphql 0.246.3__tar.gz → 0.247.1__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 (236) hide show
  1. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/pyproject.toml +1 -1
  3. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/aiohttp/views.py +16 -5
  4. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/asgi/__init__.py +20 -7
  5. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/handlers/ws_handler.py +7 -4
  6. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/async_base_view.py +3 -1
  7. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/exceptions.py +8 -0
  8. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/litestar/controller.py +26 -9
  9. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +28 -27
  10. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +12 -7
  11. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/LICENSE +0 -0
  12. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/README.md +0 -0
  13. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/__init__.py +0 -0
  14. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/__main__.py +0 -0
  15. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/aiohttp/__init__.py +0 -0
  16. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/aiohttp/test/__init__.py +0 -0
  17. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/aiohttp/test/client.py +0 -0
  18. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/annotation.py +0 -0
  19. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/asgi/test/__init__.py +0 -0
  20. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/asgi/test/client.py +0 -0
  21. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/chalice/__init__.py +0 -0
  22. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/chalice/views.py +0 -0
  23. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/__init__.py +0 -0
  24. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/handlers/__init__.py +0 -0
  25. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/handlers/base.py +0 -0
  26. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/handlers/http_handler.py +0 -0
  27. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/router.py +0 -0
  28. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/channels/testing.py +0 -0
  29. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/__init__.py +0 -0
  30. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/app.py +0 -0
  31. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/__init__.py +0 -0
  32. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/codegen.py +0 -0
  33. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/export_schema.py +0 -0
  34. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/schema_codegen.py +0 -0
  35. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/server.py +0 -0
  36. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  37. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  38. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  39. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/constants.py +0 -0
  40. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/debug_server.py +0 -0
  41. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/utils/__init__.py +0 -0
  42. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/cli/utils/load_schema.py +0 -0
  43. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/__init__.py +0 -0
  44. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/exceptions.py +0 -0
  45. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/plugins/__init__.py +0 -0
  46. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/plugins/print_operation.py +0 -0
  47. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/plugins/python.py +0 -0
  48. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/plugins/typescript.py +0 -0
  49. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/query_codegen.py +0 -0
  50. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codegen/types.py +0 -0
  51. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codemods/__init__.py +0 -0
  52. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codemods/annotated_unions.py +0 -0
  53. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/codemods/update_imports.py +0 -0
  54. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/dataloader.py +0 -0
  55. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/directive.py +0 -0
  56. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/__init__.py +0 -0
  57. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/apps.py +0 -0
  58. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/context.py +0 -0
  59. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/test/__init__.py +0 -0
  60. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/test/client.py +0 -0
  61. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/django/views.py +0 -0
  62. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/__init__.py +0 -0
  63. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/conflicting_arguments.py +0 -0
  64. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/duplicated_type_name.py +0 -0
  65. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/exception.py +0 -0
  66. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/exception_source.py +0 -0
  67. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/handler.py +0 -0
  68. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/invalid_argument_type.py +0 -0
  69. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/invalid_union_type.py +0 -0
  70. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  71. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/missing_dependencies.py +0 -0
  72. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/missing_field_annotation.py +0 -0
  73. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/missing_return_annotation.py +0 -0
  74. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  75. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  76. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
  77. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/private_strawberry_field.py +0 -0
  78. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/scalar_already_registered.py +0 -0
  79. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/syntax.py +0 -0
  80. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/unresolved_field_type.py +0 -0
  81. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/utils/__init__.py +0 -0
  82. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/exceptions/utils/source_finder.py +0 -0
  83. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/__init__.py +0 -0
  84. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/__init__.py +0 -0
  85. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/_compat.py +0 -0
  86. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/conversion.py +0 -0
  87. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  88. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/error_type.py +0 -0
  89. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/exceptions.py +0 -0
  90. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/fields.py +0 -0
  91. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/object_type.py +0 -0
  92. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/experimental/pydantic/utils.py +0 -0
  93. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/LICENSE +0 -0
  94. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/__init__.py +0 -0
  95. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/dataclasses/LICENSE +0 -0
  96. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/dataclasses/__init__.py +0 -0
  97. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  98. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/ext/mypy_plugin.py +0 -0
  99. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/__init__.py +0 -0
  100. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/add_validation_rules.py +0 -0
  101. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/base_extension.py +0 -0
  102. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/context.py +0 -0
  103. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/directives.py +0 -0
  104. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/disable_validation.py +0 -0
  105. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/field_extension.py +0 -0
  106. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/mask_errors.py +0 -0
  107. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/max_aliases.py +0 -0
  108. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/max_tokens.py +0 -0
  109. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/parser_cache.py +0 -0
  110. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/pyinstrument.py +0 -0
  111. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/query_depth_limiter.py +0 -0
  112. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/runner.py +0 -0
  113. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/__init__.py +0 -0
  114. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/apollo.py +0 -0
  115. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/datadog.py +0 -0
  116. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  117. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/sentry.py +0 -0
  118. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/tracing/utils.py +0 -0
  119. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/utils.py +0 -0
  120. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/extensions/validation_cache.py +0 -0
  121. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/fastapi/__init__.py +0 -0
  122. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/fastapi/context.py +0 -0
  123. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/fastapi/router.py +0 -0
  124. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/__init__.py +0 -0
  125. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/argument.py +0 -0
  126. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/enum.py +0 -0
  127. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/field.py +0 -0
  128. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/mutation.py +0 -0
  129. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/object_type.py +0 -0
  130. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/scalar.py +0 -0
  131. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/schema.py +0 -0
  132. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/schema_directive.py +0 -0
  133. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/schema_directives.py +0 -0
  134. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/types.py +0 -0
  135. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/federation/union.py +0 -0
  136. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/field_extensions/__init__.py +0 -0
  137. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/field_extensions/input_mutation.py +0 -0
  138. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/file_uploads/__init__.py +0 -0
  139. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/file_uploads/scalars.py +0 -0
  140. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/file_uploads/utils.py +0 -0
  141. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/flask/__init__.py +0 -0
  142. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/flask/views.py +0 -0
  143. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/__init__.py +0 -0
  144. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/base.py +0 -0
  145. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/ides.py +0 -0
  146. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/parse_content_type.py +0 -0
  147. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/sync_base_view.py +0 -0
  148. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/temporal_response.py +0 -0
  149. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/types.py +0 -0
  150. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/http/typevars.py +0 -0
  151. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/litestar/__init__.py +0 -0
  152. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/parent.py +0 -0
  153. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/permission.py +0 -0
  154. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/printer/__init__.py +0 -0
  155. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/printer/ast_from_value.py +0 -0
  156. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/printer/printer.py +0 -0
  157. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/py.typed +0 -0
  158. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/quart/__init__.py +0 -0
  159. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/quart/views.py +0 -0
  160. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/relay/__init__.py +0 -0
  161. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/relay/exceptions.py +0 -0
  162. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/relay/fields.py +0 -0
  163. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/relay/types.py +0 -0
  164. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/relay/utils.py +0 -0
  165. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/resolvers.py +0 -0
  166. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/sanic/__init__.py +0 -0
  167. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/sanic/context.py +0 -0
  168. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/sanic/utils.py +0 -0
  169. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/sanic/views.py +0 -0
  170. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/scalars.py +0 -0
  171. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/__init__.py +0 -0
  172. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/base.py +0 -0
  173. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/compat.py +0 -0
  174. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/config.py +0 -0
  175. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/exceptions.py +0 -0
  176. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/execute.py +0 -0
  177. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/name_converter.py +0 -0
  178. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/schema.py +0 -0
  179. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/schema_converter.py +0 -0
  180. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/subscribe.py +0 -0
  181. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/types/__init__.py +0 -0
  182. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/types/base_scalars.py +0 -0
  183. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/types/concrete_type.py +0 -0
  184. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/types/scalar.py +0 -0
  185. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/validation_rules/__init__.py +0 -0
  186. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema/validation_rules/one_of.py +0 -0
  187. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema_codegen/__init__.py +0 -0
  188. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema_directive.py +0 -0
  189. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/schema_directives.py +0 -0
  190. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/static/apollo-sandbox.html +0 -0
  191. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/static/graphiql.html +0 -0
  192. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/static/pathfinder.html +0 -0
  193. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/__init__.py +0 -0
  194. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/__init__.py +0 -0
  195. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  196. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  197. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  198. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  199. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/test/__init__.py +0 -0
  200. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/test/client.py +0 -0
  201. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/tools/__init__.py +0 -0
  202. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/tools/create_type.py +0 -0
  203. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/tools/merge_types.py +0 -0
  204. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/__init__.py +0 -0
  205. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/arguments.py +0 -0
  206. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/auto.py +0 -0
  207. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/base.py +0 -0
  208. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/enum.py +0 -0
  209. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/execution.py +0 -0
  210. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/field.py +0 -0
  211. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/fields/__init__.py +0 -0
  212. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/fields/resolver.py +0 -0
  213. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/graphql.py +0 -0
  214. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/info.py +0 -0
  215. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/lazy_type.py +0 -0
  216. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/mutation.py +0 -0
  217. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/nodes.py +0 -0
  218. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/object_type.py +0 -0
  219. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/private.py +0 -0
  220. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/scalar.py +0 -0
  221. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/type_resolver.py +0 -0
  222. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/union.py +0 -0
  223. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/types/unset.py +0 -0
  224. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/__init__.py +0 -0
  225. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/aio.py +0 -0
  226. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/await_maybe.py +0 -0
  227. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/dataclasses.py +0 -0
  228. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/debug.py +0 -0
  229. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/deprecations.py +0 -0
  230. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/graphql_lexer.py +0 -0
  231. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/importer.py +0 -0
  232. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/inspect.py +0 -0
  233. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/logging.py +0 -0
  234. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/operation.py +0 -0
  235. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/str_converters.py +0 -0
  236. {strawberry_graphql-0.246.3 → strawberry_graphql-0.247.1}/strawberry/utils/typing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.246.3
3
+ Version: 0.247.1
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.246.3"
4
+ version = "0.247.1"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -26,7 +26,12 @@ from strawberry.http.async_base_view import (
26
26
  AsyncHTTPRequestAdapter,
27
27
  AsyncWebSocketAdapter,
28
28
  )
29
- from strawberry.http.exceptions import HTTPException, NonJsonMessageReceived
29
+ from strawberry.http.exceptions import (
30
+ HTTPException,
31
+ NonJsonMessageReceived,
32
+ NonTextMessageReceived,
33
+ WebSocketDisconnected,
34
+ )
30
35
  from strawberry.http.types import FormData, HTTPMethod, QueryParams
31
36
  from strawberry.http.typevars import (
32
37
  Context,
@@ -86,19 +91,25 @@ class AioHTTPWebSocketAdapter(AsyncWebSocketAdapter):
86
91
  self.request = request
87
92
  self.ws = ws
88
93
 
89
- async def iter_json(self) -> AsyncGenerator[Dict[str, object], None]:
94
+ async def iter_json(
95
+ self, *, ignore_parsing_errors: bool = False
96
+ ) -> AsyncGenerator[Dict[str, object], None]:
90
97
  async for ws_message in self.ws:
91
98
  if ws_message.type == http.WSMsgType.TEXT:
92
99
  try:
93
100
  yield ws_message.json()
94
101
  except JSONDecodeError:
95
- raise NonJsonMessageReceived()
102
+ if not ignore_parsing_errors:
103
+ raise NonJsonMessageReceived()
96
104
 
97
105
  elif ws_message.type == http.WSMsgType.BINARY:
98
- raise NonJsonMessageReceived()
106
+ raise NonTextMessageReceived()
99
107
 
100
108
  async def send_json(self, message: Mapping[str, object]) -> None:
101
- await self.ws.send_json(message)
109
+ try:
110
+ await self.ws.send_json(message)
111
+ except RuntimeError as exc:
112
+ raise WebSocketDisconnected from exc
102
113
 
103
114
  async def close(self, code: int, reason: str) -> None:
104
115
  await self.ws.close(code=code, message=reason.encode())
@@ -33,7 +33,12 @@ from strawberry.http.async_base_view import (
33
33
  AsyncHTTPRequestAdapter,
34
34
  AsyncWebSocketAdapter,
35
35
  )
36
- from strawberry.http.exceptions import HTTPException, NonJsonMessageReceived
36
+ from strawberry.http.exceptions import (
37
+ HTTPException,
38
+ NonJsonMessageReceived,
39
+ NonTextMessageReceived,
40
+ WebSocketDisconnected,
41
+ )
37
42
  from strawberry.http.types import FormData, HTTPMethod, QueryParams
38
43
  from strawberry.http.typevars import (
39
44
  Context,
@@ -85,18 +90,26 @@ class ASGIWebSocketAdapter(AsyncWebSocketAdapter):
85
90
  def __init__(self, request: WebSocket, response: WebSocket) -> None:
86
91
  self.ws = response
87
92
 
88
- async def iter_json(self) -> AsyncGenerator[Dict[str, object], None]:
93
+ async def iter_json(
94
+ self, *, ignore_parsing_errors: bool = False
95
+ ) -> AsyncGenerator[Dict[str, object], None]:
89
96
  try:
90
- try:
91
- while self.ws.application_state != WebSocketState.DISCONNECTED:
97
+ while self.ws.application_state != WebSocketState.DISCONNECTED:
98
+ try:
92
99
  yield await self.ws.receive_json()
93
- except (KeyError, JSONDecodeError):
94
- raise NonJsonMessageReceived()
100
+ except JSONDecodeError: # noqa: PERF203
101
+ if not ignore_parsing_errors:
102
+ raise NonJsonMessageReceived()
103
+ except KeyError:
104
+ raise NonTextMessageReceived()
95
105
  except WebSocketDisconnect: # pragma: no cover
96
106
  pass
97
107
 
98
108
  async def send_json(self, message: Mapping[str, object]) -> None:
99
- await self.ws.send_json(message)
109
+ try:
110
+ await self.ws.send_json(message)
111
+ except WebSocketDisconnect as exc:
112
+ raise WebSocketDisconnected from exc
100
113
 
101
114
  async def close(self, code: int, reason: str) -> None:
102
115
  await self.ws.close(code=code, reason=reason)
@@ -16,7 +16,7 @@ from typing import (
16
16
  from typing_extensions import TypeGuard
17
17
 
18
18
  from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncWebSocketAdapter
19
- from strawberry.http.exceptions import NonJsonMessageReceived
19
+ from strawberry.http.exceptions import NonJsonMessageReceived, NonTextMessageReceived
20
20
  from strawberry.http.typevars import Context, RootValue
21
21
  from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL, GRAPHQL_WS_PROTOCOL
22
22
 
@@ -31,7 +31,9 @@ class ChannelsWebSocketAdapter(AsyncWebSocketAdapter):
31
31
  def __init__(self, request: GraphQLWSConsumer, response: GraphQLWSConsumer) -> None:
32
32
  self.ws_consumer = response
33
33
 
34
- async def iter_json(self) -> AsyncGenerator[Dict[str, object], None]:
34
+ async def iter_json(
35
+ self, *, ignore_parsing_errors: bool = False
36
+ ) -> AsyncGenerator[Dict[str, object], None]:
35
37
  while True:
36
38
  message = await self.ws_consumer.message_queue.get()
37
39
 
@@ -39,12 +41,13 @@ class ChannelsWebSocketAdapter(AsyncWebSocketAdapter):
39
41
  break
40
42
 
41
43
  if message["message"] is None:
42
- raise NonJsonMessageReceived()
44
+ raise NonTextMessageReceived()
43
45
 
44
46
  try:
45
47
  yield json.loads(message["message"])
46
48
  except json.JSONDecodeError:
47
- raise NonJsonMessageReceived()
49
+ if not ignore_parsing_errors:
50
+ raise NonJsonMessageReceived()
48
51
 
49
52
  async def send_json(self, message: Mapping[str, object]) -> None:
50
53
  serialized_message = json.dumps(message)
@@ -81,7 +81,9 @@ class AsyncHTTPRequestAdapter(abc.ABC):
81
81
 
82
82
  class AsyncWebSocketAdapter(abc.ABC):
83
83
  @abc.abstractmethod
84
- def iter_json(self) -> AsyncGenerator[Dict[str, object], None]: ...
84
+ def iter_json(
85
+ self, *, ignore_parsing_errors: bool = False
86
+ ) -> AsyncGenerator[Dict[str, object], None]: ...
85
87
 
86
88
  @abc.abstractmethod
87
89
  async def send_json(self, message: Mapping[str, object]) -> None: ...
@@ -4,8 +4,16 @@ class HTTPException(Exception):
4
4
  self.reason = reason
5
5
 
6
6
 
7
+ class NonTextMessageReceived(Exception):
8
+ pass
9
+
10
+
7
11
  class NonJsonMessageReceived(Exception):
8
12
  pass
9
13
 
10
14
 
15
+ class WebSocketDisconnected(Exception):
16
+ pass
17
+
18
+
11
19
  __all__ = ["HTTPException"]
@@ -2,6 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ import json
5
6
  import warnings
6
7
  from datetime import timedelta
7
8
  from typing import (
@@ -37,7 +38,6 @@ from litestar.background_tasks import BackgroundTasks
37
38
  from litestar.di import Provide
38
39
  from litestar.exceptions import (
39
40
  NotFoundException,
40
- SerializationException,
41
41
  ValidationException,
42
42
  WebSocketDisconnect,
43
43
  )
@@ -49,7 +49,12 @@ from strawberry.http.async_base_view import (
49
49
  AsyncHTTPRequestAdapter,
50
50
  AsyncWebSocketAdapter,
51
51
  )
52
- from strawberry.http.exceptions import HTTPException, NonJsonMessageReceived
52
+ from strawberry.http.exceptions import (
53
+ HTTPException,
54
+ NonJsonMessageReceived,
55
+ NonTextMessageReceived,
56
+ WebSocketDisconnected,
57
+ )
53
58
  from strawberry.http.types import FormData, HTTPMethod, QueryParams
54
59
  from strawberry.http.typevars import Context, RootValue
55
60
  from strawberry.subscriptions import GRAPHQL_TRANSPORT_WS_PROTOCOL, GRAPHQL_WS_PROTOCOL
@@ -192,18 +197,30 @@ class LitestarWebSocketAdapter(AsyncWebSocketAdapter):
192
197
  def __init__(self, request: WebSocket, response: WebSocket) -> None:
193
198
  self.ws = response
194
199
 
195
- async def iter_json(self) -> AsyncGenerator[Dict[str, object], None]:
200
+ async def iter_json(
201
+ self, *, ignore_parsing_errors: bool = False
202
+ ) -> AsyncGenerator[Dict[str, object], None]:
196
203
  try:
197
- try:
198
- while self.ws.connection_state != "disconnect":
199
- yield await self.ws.receive_json()
200
- except (SerializationException, ValueError):
201
- raise NonJsonMessageReceived()
204
+ while self.ws.connection_state != "disconnect":
205
+ text = await self.ws.receive_text()
206
+
207
+ # Litestar internally defaults to an empty string for non-text messages
208
+ if text == "":
209
+ raise NonTextMessageReceived()
210
+
211
+ try:
212
+ yield json.loads(text)
213
+ except json.JSONDecodeError:
214
+ if not ignore_parsing_errors:
215
+ raise NonJsonMessageReceived()
202
216
  except WebSocketDisconnect:
203
217
  pass
204
218
 
205
219
  async def send_json(self, message: Mapping[str, object]) -> None:
206
- await self.ws.send_json(message)
220
+ try:
221
+ await self.ws.send_json(message)
222
+ except WebSocketDisconnect as exc:
223
+ raise WebSocketDisconnected from exc
207
224
 
208
225
  async def close(self, code: int, reason: str) -> None:
209
226
  await self.ws.close(code=code, reason=reason)
@@ -7,7 +7,6 @@ from typing import (
7
7
  TYPE_CHECKING,
8
8
  Any,
9
9
  Awaitable,
10
- Callable,
11
10
  Dict,
12
11
  List,
13
12
  Optional,
@@ -15,7 +14,11 @@ from typing import (
15
14
 
16
15
  from graphql import GraphQLError, GraphQLSyntaxError, parse
17
16
 
18
- from strawberry.http.exceptions import NonJsonMessageReceived
17
+ from strawberry.http.exceptions import (
18
+ NonJsonMessageReceived,
19
+ NonTextMessageReceived,
20
+ WebSocketDisconnected,
21
+ )
19
22
  from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
20
23
  CompleteMessage,
21
24
  ConnectionAckMessage,
@@ -76,10 +79,17 @@ class BaseGraphQLTransportWSHandler:
76
79
  self.on_request_accepted()
77
80
 
78
81
  try:
79
- async for message in self.websocket.iter_json():
80
- await self.handle_message(message)
81
- except NonJsonMessageReceived:
82
- await self.handle_invalid_message("WebSocket message type must be text")
82
+ try:
83
+ async for message in self.websocket.iter_json():
84
+ await self.handle_message(message)
85
+ except NonTextMessageReceived:
86
+ await self.handle_invalid_message("WebSocket message type must be text")
87
+ except NonJsonMessageReceived:
88
+ await self.handle_invalid_message(
89
+ "WebSocket message must be valid JSON"
90
+ )
91
+ except WebSocketDisconnected:
92
+ pass
83
93
  finally:
84
94
  await self.shutdown()
85
95
 
@@ -125,50 +135,41 @@ class BaseGraphQLTransportWSHandler:
125
135
  self.task_logger.exception("Exception in worker task", exc_info=error)
126
136
 
127
137
  async def handle_message(self, message: dict) -> None:
128
- handler: Callable
129
- handler_arg: Any
130
138
  try:
131
139
  message_type = message.pop("type")
132
140
 
133
141
  if message_type == ConnectionInitMessage.type:
134
- handler = self.handle_connection_init
135
- handler_arg = ConnectionInitMessage(**message)
142
+ await self.handle_connection_init(ConnectionInitMessage(**message))
136
143
 
137
144
  elif message_type == PingMessage.type:
138
- handler = self.handle_ping
139
- handler_arg = PingMessage(**message)
145
+ await self.handle_ping(PingMessage(**message))
140
146
 
141
147
  elif message_type == PongMessage.type:
142
- handler = self.handle_pong
143
- handler_arg = PongMessage(**message)
148
+ await self.handle_pong(PongMessage(**message))
144
149
 
145
150
  elif message_type == SubscribeMessage.type:
146
- handler = self.handle_subscribe
147
-
148
151
  payload_args = message.pop("payload")
149
-
150
152
  payload = SubscribeMessagePayload(
151
153
  query=payload_args["query"],
152
154
  operationName=payload_args.get("operationName"),
153
155
  variables=payload_args.get("variables"),
154
156
  extensions=payload_args.get("extensions"),
155
157
  )
156
- handler_arg = SubscribeMessage(payload=payload, **message)
158
+ await self.handle_subscribe(
159
+ SubscribeMessage(payload=payload, **message)
160
+ )
157
161
 
158
162
  elif message_type == CompleteMessage.type:
159
- handler = self.handle_complete
160
- handler_arg = CompleteMessage(**message)
163
+ await self.handle_complete(CompleteMessage(**message))
161
164
 
162
165
  else:
163
- handler = self.handle_invalid_message
164
- handler_arg = f"Unknown message type: {message_type}"
166
+ error_message = f"Unknown message type: {message_type}"
167
+ await self.handle_invalid_message(error_message)
165
168
 
166
169
  except (KeyError, TypeError):
167
- handler = self.handle_invalid_message
168
- handler_arg = "Failed to parse message"
169
-
170
- await handler(handler_arg)
171
- await self.reap_completed_tasks()
170
+ await self.handle_invalid_message("Failed to parse message")
171
+ finally:
172
+ await self.reap_completed_tasks()
172
173
 
173
174
  async def handle_connection_init(self, message: ConnectionInitMessage) -> None:
174
175
  if self.connection_timed_out:
@@ -11,7 +11,7 @@ from typing import (
11
11
  cast,
12
12
  )
13
13
 
14
- from strawberry.http.exceptions import NonJsonMessageReceived
14
+ from strawberry.http.exceptions import NonTextMessageReceived, WebSocketDisconnected
15
15
  from strawberry.subscriptions.protocols.graphql_ws import (
16
16
  GQL_COMPLETE,
17
17
  GQL_CONNECTION_ACK,
@@ -65,12 +65,17 @@ class BaseGraphQLWSHandler:
65
65
 
66
66
  async def handle(self) -> None:
67
67
  try:
68
- async for message in self.websocket.iter_json():
69
- await self.handle_message(cast(OperationMessage, message))
70
- except NonJsonMessageReceived:
71
- await self.websocket.close(
72
- code=1002, reason="WebSocket message type must be text"
73
- )
68
+ try:
69
+ async for message in self.websocket.iter_json(
70
+ ignore_parsing_errors=True
71
+ ):
72
+ await self.handle_message(cast(OperationMessage, message))
73
+ except NonTextMessageReceived:
74
+ await self.websocket.close(
75
+ code=1002, reason="WebSocket message type must be text"
76
+ )
77
+ except WebSocketDisconnected:
78
+ pass
74
79
  finally:
75
80
  if self.keep_alive_task:
76
81
  self.keep_alive_task.cancel()