strawberry-graphql 0.253.1__tar.gz → 0.254.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.253.1 → strawberry_graphql-0.254.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/pyproject.toml +2 -2
  3. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/__init__.py +8 -1
  4. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/_compat.py +1 -1
  5. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/async_base_view.py +8 -1
  6. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +24 -10
  7. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +25 -9
  8. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +1 -0
  9. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/LICENSE +0 -0
  10. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/README.md +0 -0
  11. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/__init__.py +0 -0
  12. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/__main__.py +0 -0
  13. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/aiohttp/__init__.py +0 -0
  14. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/aiohttp/test/__init__.py +0 -0
  15. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/aiohttp/test/client.py +0 -0
  16. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/aiohttp/views.py +0 -0
  17. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/annotation.py +0 -0
  18. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/asgi/__init__.py +0 -0
  19. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/asgi/test/__init__.py +0 -0
  20. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/asgi/test/client.py +0 -0
  21. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/chalice/__init__.py +0 -0
  22. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/chalice/views.py +0 -0
  23. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/__init__.py +0 -0
  24. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/handlers/__init__.py +0 -0
  25. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/handlers/base.py +0 -0
  26. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/handlers/http_handler.py +0 -0
  27. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/handlers/ws_handler.py +0 -0
  28. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/router.py +0 -0
  29. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/channels/testing.py +0 -0
  30. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/__init__.py +0 -0
  31. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/app.py +0 -0
  32. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/__init__.py +0 -0
  33. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/codegen.py +0 -0
  34. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/export_schema.py +0 -0
  35. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/schema_codegen.py +0 -0
  36. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/server.py +0 -0
  37. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  38. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  39. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  40. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/constants.py +0 -0
  41. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/debug_server.py +0 -0
  42. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/utils/__init__.py +0 -0
  43. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/cli/utils/load_schema.py +0 -0
  44. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/__init__.py +0 -0
  45. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/exceptions.py +0 -0
  46. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/plugins/__init__.py +0 -0
  47. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  48. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/plugins/python.py +0 -0
  49. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/plugins/typescript.py +0 -0
  50. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/query_codegen.py +0 -0
  51. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codegen/types.py +0 -0
  52. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codemods/__init__.py +0 -0
  53. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codemods/annotated_unions.py +0 -0
  54. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/codemods/update_imports.py +0 -0
  55. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/dataloader.py +0 -0
  56. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/directive.py +0 -0
  57. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/__init__.py +0 -0
  58. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/apps.py +0 -0
  59. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/context.py +0 -0
  60. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/test/__init__.py +0 -0
  61. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/test/client.py +0 -0
  62. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/django/views.py +0 -0
  63. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/conflicting_arguments.py +0 -0
  64. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
  65. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/exception.py +0 -0
  66. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/exception_source.py +0 -0
  67. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/handler.py +0 -0
  68. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
  69. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  70. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  71. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/missing_dependencies.py +0 -0
  72. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
  73. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
  74. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  75. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  76. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +0 -0
  77. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
  78. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
  79. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/syntax.py +0 -0
  80. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
  81. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/utils/__init__.py +0 -0
  82. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  83. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/__init__.py +0 -0
  84. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  85. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/conversion.py +0 -0
  86. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  87. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/error_type.py +0 -0
  88. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
  89. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/fields.py +0 -0
  90. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/object_type.py +0 -0
  91. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/experimental/pydantic/utils.py +0 -0
  92. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/LICENSE +0 -0
  93. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/__init__.py +0 -0
  94. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  95. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  96. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  97. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/ext/mypy_plugin.py +0 -0
  98. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/__init__.py +0 -0
  99. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/add_validation_rules.py +0 -0
  100. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/base_extension.py +0 -0
  101. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/context.py +0 -0
  102. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/directives.py +0 -0
  103. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/disable_validation.py +0 -0
  104. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/field_extension.py +0 -0
  105. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/mask_errors.py +0 -0
  106. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/max_aliases.py +0 -0
  107. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/max_tokens.py +0 -0
  108. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/parser_cache.py +0 -0
  109. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/pyinstrument.py +0 -0
  110. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/query_depth_limiter.py +0 -0
  111. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/runner.py +0 -0
  112. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/tracing/__init__.py +0 -0
  113. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/tracing/apollo.py +0 -0
  114. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/tracing/datadog.py +0 -0
  115. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  116. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/tracing/utils.py +0 -0
  117. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/utils.py +0 -0
  118. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/extensions/validation_cache.py +0 -0
  119. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/fastapi/__init__.py +0 -0
  120. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/fastapi/context.py +0 -0
  121. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/fastapi/router.py +0 -0
  122. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/__init__.py +0 -0
  123. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/argument.py +0 -0
  124. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/enum.py +0 -0
  125. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/field.py +0 -0
  126. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/mutation.py +0 -0
  127. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/object_type.py +0 -0
  128. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/scalar.py +0 -0
  129. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/schema.py +0 -0
  130. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/schema_directive.py +0 -0
  131. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/schema_directives.py +0 -0
  132. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/types.py +0 -0
  133. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/federation/union.py +0 -0
  134. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/field_extensions/__init__.py +0 -0
  135. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/field_extensions/input_mutation.py +0 -0
  136. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/file_uploads/__init__.py +0 -0
  137. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/file_uploads/scalars.py +0 -0
  138. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/file_uploads/utils.py +0 -0
  139. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/flask/__init__.py +0 -0
  140. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/flask/views.py +0 -0
  141. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/__init__.py +0 -0
  142. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/base.py +0 -0
  143. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/exceptions.py +0 -0
  144. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/ides.py +0 -0
  145. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/parse_content_type.py +0 -0
  146. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/sync_base_view.py +0 -0
  147. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/temporal_response.py +0 -0
  148. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/types.py +0 -0
  149. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/http/typevars.py +0 -0
  150. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/litestar/__init__.py +0 -0
  151. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/litestar/controller.py +0 -0
  152. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/parent.py +0 -0
  153. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/permission.py +0 -0
  154. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/printer/__init__.py +0 -0
  155. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/printer/ast_from_value.py +0 -0
  156. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/printer/printer.py +0 -0
  157. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/py.typed +0 -0
  158. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/quart/__init__.py +0 -0
  159. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/quart/views.py +0 -0
  160. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/relay/__init__.py +0 -0
  161. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/relay/exceptions.py +0 -0
  162. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/relay/fields.py +0 -0
  163. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/relay/types.py +0 -0
  164. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/relay/utils.py +0 -0
  165. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/resolvers.py +0 -0
  166. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/sanic/__init__.py +0 -0
  167. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/sanic/context.py +0 -0
  168. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/sanic/utils.py +0 -0
  169. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/sanic/views.py +0 -0
  170. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/scalars.py +0 -0
  171. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/__init__.py +0 -0
  172. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/base.py +0 -0
  173. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/compat.py +0 -0
  174. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/config.py +0 -0
  175. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/exceptions.py +0 -0
  176. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/execute.py +0 -0
  177. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/name_converter.py +0 -0
  178. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/schema.py +0 -0
  179. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/schema_converter.py +0 -0
  180. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/subscribe.py +0 -0
  181. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/types/__init__.py +0 -0
  182. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/types/base_scalars.py +0 -0
  183. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/types/concrete_type.py +0 -0
  184. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/types/scalar.py +0 -0
  185. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/validation_rules/__init__.py +0 -0
  186. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema/validation_rules/one_of.py +0 -0
  187. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema_codegen/__init__.py +0 -0
  188. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema_directive.py +0 -0
  189. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/schema_directives.py +0 -0
  190. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/static/apollo-sandbox.html +0 -0
  191. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/static/graphiql.html +0 -0
  192. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/static/pathfinder.html +0 -0
  193. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/__init__.py +0 -0
  194. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  195. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  196. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  197. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  198. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/test/__init__.py +0 -0
  199. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/test/client.py +0 -0
  200. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/tools/__init__.py +0 -0
  201. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/tools/create_type.py +0 -0
  202. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/tools/merge_types.py +0 -0
  203. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/__init__.py +0 -0
  204. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/arguments.py +0 -0
  205. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/auto.py +0 -0
  206. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/base.py +0 -0
  207. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/enum.py +0 -0
  208. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/execution.py +0 -0
  209. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/field.py +0 -0
  210. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/fields/__init__.py +0 -0
  211. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/fields/resolver.py +0 -0
  212. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/graphql.py +0 -0
  213. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/info.py +0 -0
  214. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/lazy_type.py +0 -0
  215. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/mutation.py +0 -0
  216. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/nodes.py +0 -0
  217. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/object_type.py +0 -0
  218. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/private.py +0 -0
  219. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/scalar.py +0 -0
  220. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/type_resolver.py +0 -0
  221. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/union.py +0 -0
  222. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/types/unset.py +0 -0
  223. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/__init__.py +0 -0
  224. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/aio.py +0 -0
  225. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/await_maybe.py +0 -0
  226. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/dataclasses.py +0 -0
  227. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/debug.py +0 -0
  228. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/deprecations.py +0 -0
  229. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/graphql_lexer.py +0 -0
  230. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/importer.py +0 -0
  231. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/inspect.py +0 -0
  232. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/logging.py +0 -0
  233. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/operation.py +0 -0
  234. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.0}/strawberry/utils/str_converters.py +0 -0
  235. {strawberry_graphql-0.253.1 → strawberry_graphql-0.254.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.253.1
3
+ Version: 0.254.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.253.1"
4
+ version = "0.254.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -76,7 +76,7 @@ pygments = "^2.3"
76
76
  pyinstrument = {version = ">=4.0.0", optional = false}
77
77
  pytest = "^7.2"
78
78
  pytest-asyncio = ">=0.20.3"
79
- pytest-codspeed = "^2.0.1"
79
+ pytest-codspeed = { version = ">=3.0.0", python = ">=3.9" }
80
80
  pytest-cov = "^4.0.0"
81
81
  pytest-emoji = "^0.2.0"
82
82
  pytest-mock = "^3.10"
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from functools import cached_property
4
- from typing import TYPE_CHECKING, Optional, Set, Union
4
+ from typing import TYPE_CHECKING, Dict, Optional, Set, Union
5
5
 
6
6
  from graphql import GraphQLError
7
7
 
@@ -157,6 +157,13 @@ class StrawberryGraphQLError(GraphQLError):
157
157
  """Use it when you want to override the graphql.GraphQLError in custom extensions."""
158
158
 
159
159
 
160
+ class ConnectionRejectionError(Exception):
161
+ """Use it when you want to reject a WebSocket connection."""
162
+
163
+ def __init__(self, payload: Dict[str, object] = {}) -> None:
164
+ self.payload = payload
165
+
166
+
160
167
  __all__ = [
161
168
  "StrawberryException",
162
169
  "UnableToFindExceptionSource",
@@ -134,7 +134,7 @@ class PydanticV2Compat:
134
134
  type_=field.annotation,
135
135
  outer_type_=field.annotation,
136
136
  default=field.default,
137
- default_factory=field.default_factory,
137
+ default_factory=field.default_factory, # type: ignore
138
138
  required=field.is_required(),
139
139
  alias=field.alias,
140
140
  # v2 doesn't have allow_none
@@ -21,7 +21,6 @@ from typing_extensions import Literal, TypeGuard
21
21
 
22
22
  from graphql import GraphQLError
23
23
 
24
- from strawberry import UNSET
25
24
  from strawberry.exceptions import MissingQueryError
26
25
  from strawberry.file_uploads.utils import replace_placeholders_with_files
27
26
  from strawberry.http import (
@@ -39,6 +38,7 @@ from strawberry.subscriptions.protocols.graphql_transport_ws.handlers import (
39
38
  from strawberry.subscriptions.protocols.graphql_ws.handlers import BaseGraphQLWSHandler
40
39
  from strawberry.types import ExecutionResult, SubscriptionExecutionResult
41
40
  from strawberry.types.graphql import OperationType
41
+ from strawberry.types.unset import UNSET, UnsetType
42
42
 
43
43
  from .base import BaseView
44
44
  from .exceptions import HTTPException
@@ -279,6 +279,7 @@ class AsyncBaseHTTPView(
279
279
 
280
280
  if websocket_subprotocol == GRAPHQL_TRANSPORT_WS_PROTOCOL:
281
281
  await self.graphql_transport_ws_handler_class(
282
+ view=self,
282
283
  websocket=websocket,
283
284
  context=context,
284
285
  root_value=root_value,
@@ -288,6 +289,7 @@ class AsyncBaseHTTPView(
288
289
  ).handle()
289
290
  elif websocket_subprotocol == GRAPHQL_WS_PROTOCOL:
290
291
  await self.graphql_ws_handler_class(
292
+ view=self,
291
293
  websocket=websocket,
292
294
  context=context,
293
295
  root_value=root_value,
@@ -476,5 +478,10 @@ class AsyncBaseHTTPView(
476
478
  ) -> GraphQLHTTPResponse:
477
479
  return process_result(result)
478
480
 
481
+ async def on_ws_connect(
482
+ self, context: Context
483
+ ) -> Union[UnsetType, None, Dict[str, object]]:
484
+ return UNSET
485
+
479
486
 
480
487
  __all__ = ["AsyncBaseHTTPView"]
@@ -14,6 +14,7 @@ from typing import (
14
14
 
15
15
  from graphql import GraphQLError, GraphQLSyntaxError, parse
16
16
 
17
+ from strawberry.exceptions import ConnectionRejectionError
17
18
  from strawberry.http.exceptions import (
18
19
  NonJsonMessageReceived,
19
20
  NonTextMessageReceived,
@@ -31,13 +32,14 @@ from strawberry.subscriptions.protocols.graphql_transport_ws.types import (
31
32
  from strawberry.types import ExecutionResult
32
33
  from strawberry.types.execution import PreExecutionError
33
34
  from strawberry.types.graphql import OperationType
35
+ from strawberry.types.unset import UnsetType
34
36
  from strawberry.utils.debug import pretty_print_graphql_operation
35
37
  from strawberry.utils.operation import get_operation_type
36
38
 
37
39
  if TYPE_CHECKING:
38
40
  from datetime import timedelta
39
41
 
40
- from strawberry.http.async_base_view import AsyncWebSocketAdapter
42
+ from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncWebSocketAdapter
41
43
  from strawberry.schema import BaseSchema
42
44
  from strawberry.schema.subscribe import SubscriptionResult
43
45
 
@@ -47,6 +49,7 @@ class BaseGraphQLTransportWSHandler:
47
49
 
48
50
  def __init__(
49
51
  self,
52
+ view: AsyncBaseHTTPView,
50
53
  websocket: AsyncWebSocketAdapter,
51
54
  context: object,
52
55
  root_value: object,
@@ -54,6 +57,7 @@ class BaseGraphQLTransportWSHandler:
54
57
  debug: bool,
55
58
  connection_init_wait_timeout: timedelta,
56
59
  ) -> None:
60
+ self.view = view
57
61
  self.websocket = websocket
58
62
  self.context = context
59
63
  self.root_value = root_value
@@ -66,7 +70,6 @@ class BaseGraphQLTransportWSHandler:
66
70
  self.connection_timed_out = False
67
71
  self.operations: Dict[str, Operation] = {}
68
72
  self.completed_tasks: List[asyncio.Task] = []
69
- self.connection_params: Optional[Dict[str, object]] = None
70
73
 
71
74
  async def handle(self) -> None:
72
75
  self.on_request_accepted()
@@ -169,15 +172,31 @@ class BaseGraphQLTransportWSHandler:
169
172
  )
170
173
  return
171
174
 
172
- self.connection_params = payload
173
-
174
175
  if self.connection_init_received:
175
176
  reason = "Too many initialisation requests"
176
177
  await self.websocket.close(code=4429, reason=reason)
177
178
  return
178
179
 
179
180
  self.connection_init_received = True
180
- await self.send_message({"type": "connection_ack"})
181
+
182
+ if isinstance(self.context, dict):
183
+ self.context["connection_params"] = payload
184
+ elif hasattr(self.context, "connection_params"):
185
+ self.context.connection_params = payload
186
+
187
+ try:
188
+ connection_ack_payload = await self.view.on_ws_connect(self.context)
189
+ except ConnectionRejectionError:
190
+ await self.websocket.close(code=4403, reason="Forbidden")
191
+ return
192
+
193
+ if isinstance(connection_ack_payload, UnsetType):
194
+ await self.send_message({"type": "connection_ack"})
195
+ else:
196
+ await self.send_message(
197
+ {"type": "connection_ack", "payload": connection_ack_payload}
198
+ )
199
+
181
200
  self.connection_acknowledged = True
182
201
 
183
202
  async def handle_ping(self, message: PingMessage) -> None:
@@ -219,11 +238,6 @@ class BaseGraphQLTransportWSHandler:
219
238
  message["payload"].get("variables"),
220
239
  )
221
240
 
222
- if isinstance(self.context, dict):
223
- self.context["connection_params"] = self.connection_params
224
- elif hasattr(self.context, "connection_params"):
225
- self.context.connection_params = self.connection_params
226
-
227
241
  operation = Operation(
228
242
  self,
229
243
  message["id"],
@@ -10,6 +10,7 @@ from typing import (
10
10
  cast,
11
11
  )
12
12
 
13
+ from strawberry.exceptions import ConnectionRejectionError
13
14
  from strawberry.http.exceptions import NonTextMessageReceived, WebSocketDisconnected
14
15
  from strawberry.subscriptions.protocols.graphql_ws.types import (
15
16
  ConnectionInitMessage,
@@ -20,16 +21,18 @@ from strawberry.subscriptions.protocols.graphql_ws.types import (
20
21
  StopMessage,
21
22
  )
22
23
  from strawberry.types.execution import ExecutionResult, PreExecutionError
24
+ from strawberry.types.unset import UnsetType
23
25
  from strawberry.utils.debug import pretty_print_graphql_operation
24
26
 
25
27
  if TYPE_CHECKING:
26
- from strawberry.http.async_base_view import AsyncWebSocketAdapter
28
+ from strawberry.http.async_base_view import AsyncBaseHTTPView, AsyncWebSocketAdapter
27
29
  from strawberry.schema import BaseSchema
28
30
 
29
31
 
30
32
  class BaseGraphQLWSHandler:
31
33
  def __init__(
32
34
  self,
35
+ view: AsyncBaseHTTPView,
33
36
  websocket: AsyncWebSocketAdapter,
34
37
  context: object,
35
38
  root_value: object,
@@ -38,6 +41,7 @@ class BaseGraphQLWSHandler:
38
41
  keep_alive: bool,
39
42
  keep_alive_interval: Optional[float],
40
43
  ) -> None:
44
+ self.view = view
41
45
  self.websocket = websocket
42
46
  self.context = context
43
47
  self.root_value = root_value
@@ -48,7 +52,6 @@ class BaseGraphQLWSHandler:
48
52
  self.keep_alive_task: Optional[asyncio.Task] = None
49
53
  self.subscriptions: Dict[str, AsyncGenerator] = {}
50
54
  self.tasks: Dict[str, asyncio.Task] = {}
51
- self.connection_params: Optional[Dict[str, object]] = None
52
55
 
53
56
  async def handle(self) -> None:
54
57
  try:
@@ -92,9 +95,27 @@ class BaseGraphQLWSHandler:
92
95
  await self.websocket.close(code=1000, reason="")
93
96
  return
94
97
 
95
- self.connection_params = payload
98
+ if isinstance(self.context, dict):
99
+ self.context["connection_params"] = payload
100
+ elif hasattr(self.context, "connection_params"):
101
+ self.context.connection_params = payload
96
102
 
97
- await self.send_message({"type": "connection_ack"})
103
+ try:
104
+ connection_ack_payload = await self.view.on_ws_connect(self.context)
105
+ except ConnectionRejectionError as e:
106
+ await self.send_message({"type": "connection_error", "payload": e.payload})
107
+ await self.websocket.close(code=1011, reason="")
108
+ return
109
+
110
+ if (
111
+ isinstance(connection_ack_payload, UnsetType)
112
+ or connection_ack_payload is None
113
+ ):
114
+ await self.send_message({"type": "connection_ack"})
115
+ else:
116
+ await self.send_message(
117
+ {"type": "connection_ack", "payload": connection_ack_payload}
118
+ )
98
119
 
99
120
  if self.keep_alive:
100
121
  keep_alive_handler = self.handle_keep_alive()
@@ -112,11 +133,6 @@ class BaseGraphQLWSHandler:
112
133
  operation_name = payload.get("operationName")
113
134
  variables = payload.get("variables")
114
135
 
115
- if isinstance(self.context, dict):
116
- self.context["connection_params"] = self.connection_params
117
- elif hasattr(self.context, "connection_params"):
118
- self.context.connection_params = self.connection_params
119
-
120
136
  if self.debug:
121
137
  pretty_print_graphql_operation(operation_name, query, variables)
122
138
 
@@ -37,6 +37,7 @@ class ConnectionErrorMessage(TypedDict):
37
37
 
38
38
  class ConnectionAckMessage(TypedDict):
39
39
  type: Literal["connection_ack"]
40
+ payload: NotRequired[Dict[str, object]]
40
41
 
41
42
 
42
43
  class DataMessagePayload(TypedDict):