strawberry-graphql 0.250.0__tar.gz → 0.251.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.250.0 → strawberry_graphql-0.251.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/pyproject.toml +1 -1
  3. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/aiohttp/views.py +5 -2
  4. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/asgi/__init__.py +5 -2
  5. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/handlers/ws_handler.py +8 -2
  6. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/views.py +2 -2
  7. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/async_base_view.py +6 -2
  8. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/base.py +2 -3
  9. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/litestar/controller.py +5 -2
  10. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +18 -27
  11. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +1 -0
  12. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/LICENSE +0 -0
  13. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/README.md +0 -0
  14. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/__init__.py +0 -0
  15. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/__main__.py +0 -0
  16. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/aiohttp/__init__.py +0 -0
  17. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/aiohttp/test/__init__.py +0 -0
  18. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/aiohttp/test/client.py +0 -0
  19. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/annotation.py +0 -0
  20. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/asgi/test/__init__.py +0 -0
  21. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/asgi/test/client.py +0 -0
  22. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/chalice/__init__.py +0 -0
  23. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/chalice/views.py +0 -0
  24. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/__init__.py +0 -0
  25. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/handlers/__init__.py +0 -0
  26. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/handlers/base.py +0 -0
  27. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/handlers/http_handler.py +0 -0
  28. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/router.py +0 -0
  29. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/channels/testing.py +0 -0
  30. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/__init__.py +0 -0
  31. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/app.py +0 -0
  32. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/__init__.py +0 -0
  33. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/codegen.py +0 -0
  34. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/export_schema.py +0 -0
  35. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/schema_codegen.py +0 -0
  36. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/server.py +0 -0
  37. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  38. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  39. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  40. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/constants.py +0 -0
  41. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/debug_server.py +0 -0
  42. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/utils/__init__.py +0 -0
  43. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/cli/utils/load_schema.py +0 -0
  44. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/__init__.py +0 -0
  45. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/exceptions.py +0 -0
  46. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/plugins/__init__.py +0 -0
  47. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  48. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/plugins/python.py +0 -0
  49. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/plugins/typescript.py +0 -0
  50. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/query_codegen.py +0 -0
  51. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codegen/types.py +0 -0
  52. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codemods/__init__.py +0 -0
  53. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codemods/annotated_unions.py +0 -0
  54. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/codemods/update_imports.py +0 -0
  55. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/dataloader.py +0 -0
  56. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/directive.py +0 -0
  57. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/__init__.py +0 -0
  58. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/apps.py +0 -0
  59. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/context.py +0 -0
  60. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/test/__init__.py +0 -0
  61. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/django/test/client.py +0 -0
  62. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/__init__.py +0 -0
  63. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
  64. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
  65. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/exception.py +0 -0
  66. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/exception_source.py +0 -0
  67. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/handler.py +0 -0
  68. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
  69. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  70. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  71. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/missing_dependencies.py +0 -0
  72. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
  73. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
  74. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  75. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  76. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
  77. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
  78. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
  79. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/syntax.py +0 -0
  80. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
  81. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/utils/__init__.py +0 -0
  82. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  83. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/__init__.py +0 -0
  84. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  85. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/_compat.py +0 -0
  86. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/conversion.py +0 -0
  87. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  88. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/error_type.py +0 -0
  89. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
  90. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/fields.py +0 -0
  91. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/object_type.py +0 -0
  92. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/experimental/pydantic/utils.py +0 -0
  93. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/LICENSE +0 -0
  94. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/__init__.py +0 -0
  95. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  96. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  97. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  98. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/ext/mypy_plugin.py +0 -0
  99. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/__init__.py +0 -0
  100. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/add_validation_rules.py +0 -0
  101. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/base_extension.py +0 -0
  102. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/context.py +0 -0
  103. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/directives.py +0 -0
  104. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/disable_validation.py +0 -0
  105. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/field_extension.py +0 -0
  106. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/mask_errors.py +0 -0
  107. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/max_aliases.py +0 -0
  108. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/max_tokens.py +0 -0
  109. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/parser_cache.py +0 -0
  110. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/pyinstrument.py +0 -0
  111. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/query_depth_limiter.py +0 -0
  112. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/runner.py +0 -0
  113. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/tracing/__init__.py +0 -0
  114. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/tracing/apollo.py +0 -0
  115. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/tracing/datadog.py +0 -0
  116. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  117. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/tracing/utils.py +0 -0
  118. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/utils.py +0 -0
  119. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/extensions/validation_cache.py +0 -0
  120. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/fastapi/__init__.py +0 -0
  121. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/fastapi/context.py +0 -0
  122. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/fastapi/router.py +0 -0
  123. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/__init__.py +0 -0
  124. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/argument.py +0 -0
  125. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/enum.py +0 -0
  126. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/field.py +0 -0
  127. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/mutation.py +0 -0
  128. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/object_type.py +0 -0
  129. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/scalar.py +0 -0
  130. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/schema.py +0 -0
  131. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/schema_directive.py +0 -0
  132. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/schema_directives.py +0 -0
  133. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/types.py +0 -0
  134. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/federation/union.py +0 -0
  135. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/field_extensions/__init__.py +0 -0
  136. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/field_extensions/input_mutation.py +0 -0
  137. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/file_uploads/__init__.py +0 -0
  138. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/file_uploads/scalars.py +0 -0
  139. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/file_uploads/utils.py +0 -0
  140. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/flask/__init__.py +0 -0
  141. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/flask/views.py +0 -0
  142. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/__init__.py +0 -0
  143. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/exceptions.py +0 -0
  144. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/ides.py +0 -0
  145. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/parse_content_type.py +0 -0
  146. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/sync_base_view.py +0 -0
  147. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/temporal_response.py +0 -0
  148. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/types.py +0 -0
  149. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/http/typevars.py +0 -0
  150. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/litestar/__init__.py +0 -0
  151. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/parent.py +0 -0
  152. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/permission.py +0 -0
  153. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/printer/__init__.py +0 -0
  154. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/printer/ast_from_value.py +0 -0
  155. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/printer/printer.py +0 -0
  156. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/py.typed +0 -0
  157. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/quart/__init__.py +0 -0
  158. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/quart/views.py +0 -0
  159. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/relay/__init__.py +0 -0
  160. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/relay/exceptions.py +0 -0
  161. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/relay/fields.py +0 -0
  162. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/relay/types.py +0 -0
  163. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/relay/utils.py +0 -0
  164. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/resolvers.py +0 -0
  165. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/sanic/__init__.py +0 -0
  166. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/sanic/context.py +0 -0
  167. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/sanic/utils.py +0 -0
  168. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/sanic/views.py +0 -0
  169. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/scalars.py +0 -0
  170. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/__init__.py +0 -0
  171. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/base.py +0 -0
  172. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/compat.py +0 -0
  173. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/config.py +0 -0
  174. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/exceptions.py +0 -0
  175. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/execute.py +0 -0
  176. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/name_converter.py +0 -0
  177. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/schema.py +0 -0
  178. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/schema_converter.py +0 -0
  179. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/subscribe.py +0 -0
  180. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/types/__init__.py +0 -0
  181. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/types/base_scalars.py +0 -0
  182. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/types/concrete_type.py +0 -0
  183. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/types/scalar.py +0 -0
  184. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/validation_rules/__init__.py +0 -0
  185. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema/validation_rules/one_of.py +0 -0
  186. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema_codegen/__init__.py +0 -0
  187. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema_directive.py +0 -0
  188. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/schema_directives.py +0 -0
  189. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/static/apollo-sandbox.html +0 -0
  190. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/static/graphiql.html +0 -0
  191. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/static/pathfinder.html +0 -0
  192. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/__init__.py +0 -0
  193. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  194. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  195. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
  196. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  197. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  198. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/test/__init__.py +0 -0
  199. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/test/client.py +0 -0
  200. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/tools/__init__.py +0 -0
  201. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/tools/create_type.py +0 -0
  202. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/tools/merge_types.py +0 -0
  203. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/__init__.py +0 -0
  204. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/arguments.py +0 -0
  205. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/auto.py +0 -0
  206. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/base.py +0 -0
  207. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/enum.py +0 -0
  208. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/execution.py +0 -0
  209. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/field.py +0 -0
  210. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/fields/__init__.py +0 -0
  211. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/fields/resolver.py +0 -0
  212. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/graphql.py +0 -0
  213. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/info.py +0 -0
  214. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/lazy_type.py +0 -0
  215. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/mutation.py +0 -0
  216. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/nodes.py +0 -0
  217. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/object_type.py +0 -0
  218. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/private.py +0 -0
  219. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/scalar.py +0 -0
  220. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/type_resolver.py +0 -0
  221. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/union.py +0 -0
  222. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/types/unset.py +0 -0
  223. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/__init__.py +0 -0
  224. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/aio.py +0 -0
  225. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/await_maybe.py +0 -0
  226. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/dataclasses.py +0 -0
  227. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/debug.py +0 -0
  228. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/deprecations.py +0 -0
  229. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/graphql_lexer.py +0 -0
  230. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/importer.py +0 -0
  231. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/inspect.py +0 -0
  232. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/logging.py +0 -0
  233. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/operation.py +0 -0
  234. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.0}/strawberry/utils/str_converters.py +0 -0
  235. {strawberry_graphql-0.250.0 → strawberry_graphql-0.251.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.250.0
3
+ Version: 0.251.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.250.0"
4
+ version = "0.251.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -87,7 +87,10 @@ class AioHTTPRequestAdapter(AsyncHTTPRequestAdapter):
87
87
 
88
88
 
89
89
  class AioHTTPWebSocketAdapter(AsyncWebSocketAdapter):
90
- def __init__(self, request: web.Request, ws: web.WebSocketResponse) -> None:
90
+ def __init__(
91
+ self, view: AsyncBaseHTTPView, request: web.Request, ws: web.WebSocketResponse
92
+ ) -> None:
93
+ super().__init__(view)
91
94
  self.request = request
92
95
  self.ws = ws
93
96
 
@@ -107,7 +110,7 @@ class AioHTTPWebSocketAdapter(AsyncWebSocketAdapter):
107
110
 
108
111
  async def send_json(self, message: Mapping[str, object]) -> None:
109
112
  try:
110
- await self.ws.send_json(message)
113
+ await self.ws.send_str(self.view.encode_json(message))
111
114
  except RuntimeError as exc:
112
115
  raise WebSocketDisconnected from exc
113
116
 
@@ -87,7 +87,10 @@ class ASGIRequestAdapter(AsyncHTTPRequestAdapter):
87
87
 
88
88
 
89
89
  class ASGIWebSocketAdapter(AsyncWebSocketAdapter):
90
- def __init__(self, request: WebSocket, response: WebSocket) -> None:
90
+ def __init__(
91
+ self, view: AsyncBaseHTTPView, request: WebSocket, response: WebSocket
92
+ ) -> None:
93
+ super().__init__(view)
91
94
  self.ws = response
92
95
 
93
96
  async def iter_json(
@@ -107,7 +110,7 @@ class ASGIWebSocketAdapter(AsyncWebSocketAdapter):
107
110
 
108
111
  async def send_json(self, message: Mapping[str, object]) -> None:
109
112
  try:
110
- await self.ws.send_json(message)
113
+ await self.ws.send_text(self.view.encode_json(message))
111
114
  except WebSocketDisconnect as exc:
112
115
  raise WebSocketDisconnected from exc
113
116
 
@@ -28,7 +28,13 @@ if TYPE_CHECKING:
28
28
 
29
29
 
30
30
  class ChannelsWebSocketAdapter(AsyncWebSocketAdapter):
31
- def __init__(self, request: GraphQLWSConsumer, response: GraphQLWSConsumer) -> None:
31
+ def __init__(
32
+ self,
33
+ view: AsyncBaseHTTPView,
34
+ request: GraphQLWSConsumer,
35
+ response: GraphQLWSConsumer,
36
+ ) -> None:
37
+ super().__init__(view)
32
38
  self.ws_consumer = response
33
39
 
34
40
  async def iter_json(
@@ -50,7 +56,7 @@ class ChannelsWebSocketAdapter(AsyncWebSocketAdapter):
50
56
  raise NonJsonMessageReceived()
51
57
 
52
58
  async def send_json(self, message: Mapping[str, object]) -> None:
53
- serialized_message = json.dumps(message)
59
+ serialized_message = self.view.encode_json(message)
54
60
  await self.ws_consumer.send(serialized_message)
55
61
 
56
62
  async def close(self, code: int, reason: str) -> None:
@@ -201,8 +201,8 @@ class BaseView:
201
201
  },
202
202
  )
203
203
 
204
- def encode_json(self, response_data: GraphQLHTTPResponse) -> str:
205
- return json.dumps(response_data, cls=DjangoJSONEncoder)
204
+ def encode_json(self, data: object) -> str:
205
+ return json.dumps(data, cls=DjangoJSONEncoder)
206
206
 
207
207
 
208
208
  class GraphQLView(
@@ -80,6 +80,9 @@ class AsyncHTTPRequestAdapter(abc.ABC):
80
80
 
81
81
 
82
82
  class AsyncWebSocketAdapter(abc.ABC):
83
+ def __init__(self, view: "AsyncBaseHTTPView") -> None:
84
+ self.view = view
85
+
83
86
  @abc.abstractmethod
84
87
  def iter_json(
85
88
  self, *, ignore_parsing_errors: bool = False
@@ -113,7 +116,8 @@ class AsyncBaseHTTPView(
113
116
  connection_init_wait_timeout: timedelta = timedelta(minutes=1)
114
117
  request_adapter_class: Callable[[Request], AsyncHTTPRequestAdapter]
115
118
  websocket_adapter_class: Callable[
116
- [WebSocketRequest, WebSocketResponse], AsyncWebSocketAdapter
119
+ ["AsyncBaseHTTPView", WebSocketRequest, WebSocketResponse],
120
+ AsyncWebSocketAdapter,
117
121
  ]
118
122
  graphql_transport_ws_handler_class = BaseGraphQLTransportWSHandler
119
123
  graphql_ws_handler_class = BaseGraphQLWSHandler
@@ -265,7 +269,7 @@ class AsyncBaseHTTPView(
265
269
  websocket_response = await self.create_websocket_response(
266
270
  request, websocket_subprotocol
267
271
  )
268
- websocket = self.websocket_adapter_class(request, websocket_response)
272
+ websocket = self.websocket_adapter_class(self, request, websocket_response)
269
273
 
270
274
  context = (
271
275
  await self.get_context(request, response=websocket_response)
@@ -2,7 +2,6 @@ import json
2
2
  from typing import Any, Dict, Generic, List, Mapping, Optional, Union
3
3
  from typing_extensions import Protocol
4
4
 
5
- from strawberry.http import GraphQLHTTPResponse
6
5
  from strawberry.http.ides import GraphQL_IDE, get_graphql_ide_html
7
6
  from strawberry.http.types import HTTPMethod, QueryParams
8
7
 
@@ -44,8 +43,8 @@ class BaseView(Generic[Request]):
44
43
  except json.JSONDecodeError as e:
45
44
  raise HTTPException(400, "Unable to parse request body as JSON") from e
46
45
 
47
- def encode_json(self, response_data: GraphQLHTTPResponse) -> str:
48
- return json.dumps(response_data)
46
+ def encode_json(self, data: object) -> str:
47
+ return json.dumps(data)
49
48
 
50
49
  def parse_query_params(self, params: QueryParams) -> Dict[str, Any]:
51
50
  params = dict(params)
@@ -194,7 +194,10 @@ class LitestarRequestAdapter(AsyncHTTPRequestAdapter):
194
194
 
195
195
 
196
196
  class LitestarWebSocketAdapter(AsyncWebSocketAdapter):
197
- def __init__(self, request: WebSocket, response: WebSocket) -> None:
197
+ def __init__(
198
+ self, view: AsyncBaseHTTPView, request: WebSocket, response: WebSocket
199
+ ) -> None:
200
+ super().__init__(view)
198
201
  self.ws = response
199
202
 
200
203
  async def iter_json(
@@ -218,7 +221,7 @@ class LitestarWebSocketAdapter(AsyncWebSocketAdapter):
218
221
 
219
222
  async def send_json(self, message: Mapping[str, object]) -> None:
220
223
  try:
221
- await self.ws.send_json(message)
224
+ await self.ws.send_data(data=self.view.encode_json(message))
222
225
  except WebSocketDisconnect as exc:
223
226
  raise WebSocketDisconnected from exc
224
227
 
@@ -12,14 +12,9 @@ from typing import (
12
12
 
13
13
  from strawberry.http.exceptions import NonTextMessageReceived, WebSocketDisconnected
14
14
  from strawberry.subscriptions.protocols.graphql_ws.types import (
15
- CompleteMessage,
16
- ConnectionAckMessage,
17
- ConnectionErrorMessage,
18
15
  ConnectionInitMessage,
19
- ConnectionKeepAliveMessage,
20
16
  ConnectionTerminateMessage,
21
17
  DataMessage,
22
- ErrorMessage,
23
18
  OperationMessage,
24
19
  StartMessage,
25
20
  StopMessage,
@@ -93,15 +88,13 @@ class BaseGraphQLWSHandler:
93
88
  async def handle_connection_init(self, message: ConnectionInitMessage) -> None:
94
89
  payload = message.get("payload")
95
90
  if payload is not None and not isinstance(payload, dict):
96
- error_message: ConnectionErrorMessage = {"type": "connection_error"}
97
- await self.websocket.send_json(error_message)
91
+ await self.send_message({"type": "connection_error"})
98
92
  await self.websocket.close(code=1000, reason="")
99
93
  return
100
94
 
101
95
  self.connection_params = payload
102
96
 
103
- connection_ack_message: ConnectionAckMessage = {"type": "connection_ack"}
104
- await self.websocket.send_json(connection_ack_message)
97
+ await self.send_message({"type": "connection_ack"})
105
98
 
106
99
  if self.keep_alive:
107
100
  keep_alive_handler = self.handle_keep_alive()
@@ -139,8 +132,7 @@ class BaseGraphQLWSHandler:
139
132
  async def handle_keep_alive(self) -> None:
140
133
  assert self.keep_alive_interval
141
134
  while True:
142
- data: ConnectionKeepAliveMessage = {"type": "ka"}
143
- await self.websocket.send_json(data)
135
+ await self.send_message({"type": "ka"})
144
136
  await asyncio.sleep(self.keep_alive_interval)
145
137
 
146
138
  async def handle_async_results(
@@ -160,26 +152,22 @@ class BaseGraphQLWSHandler:
160
152
  )
161
153
  if isinstance(agen_or_err, PreExecutionError):
162
154
  assert agen_or_err.errors
163
- error_payload = agen_or_err.errors[0].formatted
164
- error_message: ErrorMessage = {
165
- "type": "error",
166
- "id": operation_id,
167
- "payload": error_payload,
168
- }
169
- await self.websocket.send_json(error_message)
155
+ await self.send_message(
156
+ {
157
+ "type": "error",
158
+ "id": operation_id,
159
+ "payload": agen_or_err.errors[0].formatted,
160
+ }
161
+ )
170
162
  else:
171
163
  self.subscriptions[operation_id] = agen_or_err
172
164
 
173
165
  async for result in agen_or_err:
174
- await self.send_data(result, operation_id)
166
+ await self.send_data_message(result, operation_id)
175
167
 
176
- await self.websocket.send_json(
177
- CompleteMessage({"type": "complete", "id": operation_id})
178
- )
168
+ await self.send_message({"type": "complete", "id": operation_id})
179
169
  except asyncio.CancelledError:
180
- await self.websocket.send_json(
181
- CompleteMessage({"type": "complete", "id": operation_id})
182
- )
170
+ await self.send_message({"type": "complete", "id": operation_id})
183
171
 
184
172
  async def cleanup_operation(self, operation_id: str) -> None:
185
173
  if operation_id in self.subscriptions:
@@ -192,7 +180,7 @@ class BaseGraphQLWSHandler:
192
180
  await self.tasks[operation_id]
193
181
  del self.tasks[operation_id]
194
182
 
195
- async def send_data(
183
+ async def send_data_message(
196
184
  self, execution_result: ExecutionResult, operation_id: str
197
185
  ) -> None:
198
186
  data_message: DataMessage = {
@@ -209,7 +197,10 @@ class BaseGraphQLWSHandler:
209
197
  if execution_result.extensions:
210
198
  data_message["payload"]["extensions"] = execution_result.extensions
211
199
 
212
- await self.websocket.send_json(data_message)
200
+ await self.send_message(data_message)
201
+
202
+ async def send_message(self, message: OperationMessage) -> None:
203
+ await self.websocket.send_json(message)
213
204
 
214
205
 
215
206
  __all__ = ["BaseGraphQLWSHandler"]
@@ -78,6 +78,7 @@ OperationMessage = Union[
78
78
  DataMessage,
79
79
  ErrorMessage,
80
80
  CompleteMessage,
81
+ ConnectionKeepAliveMessage,
81
82
  ]
82
83
 
83
84