strawberry-graphql 0.159.0__tar.gz → 0.160.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 (211) hide show
  1. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/pyproject.toml +2 -2
  3. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/mypy_plugin.py +2 -0
  4. strawberry_graphql-0.160.0/strawberry/extensions/__init__.py +35 -0
  5. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/add_validation_rules.py +2 -2
  6. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/base_extension.py +8 -6
  7. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/context.py +13 -13
  8. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/directives.py +3 -3
  9. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/disable_validation.py +2 -2
  10. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/mask_errors.py +2 -2
  11. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/parser_cache.py +2 -2
  12. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/runner.py +8 -6
  13. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/tracing/apollo.py +2 -2
  14. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/tracing/datadog.py +2 -2
  15. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/tracing/opentelemetry.py +2 -2
  16. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/validation_cache.py +2 -2
  17. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/schema.py +2 -2
  18. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/object_type.py +1 -1
  19. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/execute.py +6 -6
  20. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/schema.py +3 -3
  21. strawberry_graphql-0.159.0/setup.py +0 -105
  22. strawberry_graphql-0.159.0/strawberry/extensions/__init__.py +0 -17
  23. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/LICENSE +0 -0
  24. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/README.md +0 -0
  25. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/__init__.py +0 -0
  26. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/__main__.py +0 -0
  27. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/__init__.py +0 -0
  28. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/handlers/__init__.py +0 -0
  29. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
  30. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
  31. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/handlers/http_handler.py +0 -0
  32. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/test/__init__.py +0 -0
  33. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/test/client.py +0 -0
  34. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/aiohttp/views.py +0 -0
  35. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/annotation.py +0 -0
  36. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/arguments.py +0 -0
  37. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/__init__.py +0 -0
  38. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/handlers/__init__.py +0 -0
  39. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
  40. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
  41. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/handlers/http_handler.py +0 -0
  42. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/test/__init__.py +0 -0
  43. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/asgi/test/client.py +0 -0
  44. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/auto.py +0 -0
  45. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/chalice/__init__.py +0 -0
  46. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/chalice/views.py +0 -0
  47. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/__init__.py +0 -0
  48. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/context.py +0 -0
  49. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/handlers/base.py +0 -0
  50. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
  51. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
  52. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/handlers/http_handler.py +0 -0
  53. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/handlers/ws_handler.py +0 -0
  54. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/router.py +0 -0
  55. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/channels/testing.py +0 -0
  56. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/__init__.py +0 -0
  57. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/commands/__init__.py +0 -0
  58. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/commands/codegen.py +0 -0
  59. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/commands/export_schema.py +0 -0
  60. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/commands/server.py +0 -0
  61. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/constants.py +0 -0
  62. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/debug_server.py +0 -0
  63. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/utils/__init__.py +0 -0
  64. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/cli/utils/load_schema.py +0 -0
  65. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/__init__.py +0 -0
  66. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/exceptions.py +0 -0
  67. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/plugins/__init__.py +0 -0
  68. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  69. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/plugins/python.py +0 -0
  70. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/plugins/typescript.py +0 -0
  71. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/query_codegen.py +0 -0
  72. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/codegen/types.py +0 -0
  73. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/custom_scalar.py +0 -0
  74. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/dataloader.py +0 -0
  75. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/directive.py +0 -0
  76. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/__init__.py +0 -0
  77. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/apps.py +0 -0
  78. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/context.py +0 -0
  79. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/test/__init__.py +0 -0
  80. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/test/client.py +0 -0
  81. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/django/views.py +0 -0
  82. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/enum.py +0 -0
  83. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/__init__.py +0 -0
  84. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/duplicated_type_name.py +0 -0
  85. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/exception.py +0 -0
  86. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/exception_source.py +0 -0
  87. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/handler.py +0 -0
  88. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/invalid_argument_type.py +0 -0
  89. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  90. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  91. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/missing_field_annotation.py +0 -0
  92. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/missing_return_annotation.py +0 -0
  93. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
  94. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  95. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  96. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/private_strawberry_field.py +0 -0
  97. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/scalar_already_registered.py +0 -0
  98. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/syntax.py +0 -0
  99. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/unresolved_field_type.py +0 -0
  100. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/utils/__init__.py +0 -0
  101. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  102. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/__init__.py +0 -0
  103. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  104. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/conversion.py +0 -0
  105. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  106. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/error_type.py +0 -0
  107. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/exceptions.py +0 -0
  108. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/fields.py +0 -0
  109. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/object_type.py +0 -0
  110. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/experimental/pydantic/utils.py +0 -0
  111. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/LICENSE +0 -0
  112. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/__init__.py +0 -0
  113. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  114. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  115. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  116. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/query_depth_limiter.py +0 -0
  117. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/tracing/__init__.py +0 -0
  118. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/tracing/utils.py +0 -0
  119. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/extensions/utils.py +0 -0
  120. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/__init__.py +0 -0
  121. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/context.py +0 -0
  122. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/handlers/__init__.py +0 -0
  123. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
  124. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
  125. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/fastapi/router.py +0 -0
  126. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/__init__.py +0 -0
  127. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/argument.py +0 -0
  128. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/enum.py +0 -0
  129. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/field.py +0 -0
  130. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/mutation.py +0 -0
  131. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/object_type.py +0 -0
  132. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/scalar.py +0 -0
  133. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/schema_directive.py +0 -0
  134. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/schema_directives.py +0 -0
  135. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/types.py +0 -0
  136. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/federation/union.py +0 -0
  137. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/field.py +0 -0
  138. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/file_uploads/__init__.py +0 -0
  139. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/file_uploads/scalars.py +0 -0
  140. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/file_uploads/utils.py +0 -0
  141. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/flask/__init__.py +0 -0
  142. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/flask/graphiql.py +0 -0
  143. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/flask/views.py +0 -0
  144. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/http/__init__.py +0 -0
  145. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/http/temporal_response.py +0 -0
  146. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/lazy_type.py +0 -0
  147. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/mutation.py +0 -0
  148. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/permission.py +0 -0
  149. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/printer/__init__.py +0 -0
  150. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/printer/ast_from_value.py +0 -0
  151. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/printer/printer.py +0 -0
  152. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/private.py +0 -0
  153. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/py.typed +0 -0
  154. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/resolvers.py +0 -0
  155. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/sanic/__init__.py +0 -0
  156. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/sanic/context.py +0 -0
  157. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/sanic/graphiql.py +0 -0
  158. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/sanic/utils.py +0 -0
  159. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/sanic/views.py +0 -0
  160. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/scalars.py +0 -0
  161. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/__init__.py +0 -0
  162. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/base.py +0 -0
  163. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/compat.py +0 -0
  164. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/config.py +0 -0
  165. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/exceptions.py +0 -0
  166. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/name_converter.py +0 -0
  167. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/schema_converter.py +0 -0
  168. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/types/__init__.py +0 -0
  169. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/types/base_scalars.py +0 -0
  170. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/types/concrete_type.py +0 -0
  171. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema/types/scalar.py +0 -0
  172. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/schema_directive.py +0 -0
  173. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/static/graphiql.html +0 -0
  174. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/__init__.py +0 -0
  175. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  176. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  177. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
  178. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  179. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  180. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
  181. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  182. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/test/__init__.py +0 -0
  183. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/test/client.py +0 -0
  184. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/tools/__init__.py +0 -0
  185. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/tools/create_type.py +0 -0
  186. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/tools/merge_types.py +0 -0
  187. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/type.py +0 -0
  188. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/__init__.py +0 -0
  189. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/execution.py +0 -0
  190. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/fields/__init__.py +0 -0
  191. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/fields/resolver.py +0 -0
  192. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/graphql.py +0 -0
  193. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/info.py +0 -0
  194. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/nodes.py +0 -0
  195. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/type_resolver.py +0 -0
  196. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/types/types.py +0 -0
  197. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/union.py +0 -0
  198. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/unset.py +0 -0
  199. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/__init__.py +0 -0
  200. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/await_maybe.py +0 -0
  201. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/cached_property.py +0 -0
  202. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/dataclasses.py +0 -0
  203. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/debug.py +0 -0
  204. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/graphiql.py +0 -0
  205. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/graphql_lexer.py +0 -0
  206. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/importer.py +0 -0
  207. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/inspect.py +0 -0
  208. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/logging.py +0 -0
  209. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/operation.py +0 -0
  210. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.0}/strawberry/utils/str_converters.py +0 -0
  211. {strawberry_graphql-0.159.0 → strawberry_graphql-0.160.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.159.0
3
+ Version: 0.160.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.159.0"
4
+ version = "0.160.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -68,7 +68,7 @@ pytest = "^7.2"
68
68
  pytest-emoji = "^0.2.0"
69
69
  black = "^22"
70
70
  pytest-asyncio = "^0.20.3"
71
- mypy = "1.0.0"
71
+ mypy = "1.1.1"
72
72
  pytest-mypy-plugins = "^1.10"
73
73
  pytest-mock = "^3.10"
74
74
  pytest-django = {version = "^4.5"}
@@ -785,6 +785,8 @@ class CustomDataclassTransformer:
785
785
  params["info"] = cls.info
786
786
  if MypyVersion.VERSION >= Decimal("0.920"):
787
787
  params["kw_only"] = True
788
+ if MypyVersion.VERSION >= Decimal("1.1"):
789
+ params["alias"] = None
788
790
 
789
791
  attribute = DataclassAttribute(**params)
790
792
  attrs.append(attribute)
@@ -0,0 +1,35 @@
1
+ import warnings
2
+
3
+ from .add_validation_rules import AddValidationRules
4
+ from .base_extension import SchemaExtension
5
+ from .disable_validation import DisableValidation
6
+ from .mask_errors import MaskErrors
7
+ from .parser_cache import ParserCache
8
+ from .query_depth_limiter import QueryDepthLimiter
9
+ from .validation_cache import ValidationCache
10
+
11
+
12
+ def __getattr__(name: str):
13
+ if name == "Extension":
14
+ warnings.warn(
15
+ (
16
+ "importing `Extension` from `strawberry.extensions` "
17
+ "is deprecated, import `SchemaExtension` instead."
18
+ ),
19
+ DeprecationWarning,
20
+ stacklevel=2,
21
+ )
22
+ return SchemaExtension
23
+
24
+ raise AttributeError(f"module {__name__} has no attribute {name}")
25
+
26
+
27
+ __all__ = [
28
+ "SchemaExtension",
29
+ "AddValidationRules",
30
+ "DisableValidation",
31
+ "ParserCache",
32
+ "QueryDepthLimiter",
33
+ "ValidationCache",
34
+ "MaskErrors",
35
+ ]
@@ -2,13 +2,13 @@ from __future__ import annotations
2
2
 
3
3
  from typing import TYPE_CHECKING, Iterator, List, Type
4
4
 
5
- from strawberry.extensions.base_extension import Extension
5
+ from strawberry.extensions.base_extension import SchemaExtension
6
6
 
7
7
  if TYPE_CHECKING:
8
8
  from graphql import ASTValidationRule
9
9
 
10
10
 
11
- class AddValidationRules(Extension):
11
+ class AddValidationRules(SchemaExtension):
12
12
  """
13
13
  Add graphql-core validation rules
14
14
 
@@ -10,7 +10,9 @@ if TYPE_CHECKING:
10
10
  from strawberry.types import ExecutionContext
11
11
 
12
12
 
13
- class Extension:
13
+ class SchemaExtension:
14
+ execution_context: ExecutionContext
15
+
14
16
  def __init__(self, *, execution_context: ExecutionContext):
15
17
  self.execution_context = execution_context
16
18
 
@@ -47,11 +49,11 @@ class Extension:
47
49
  return {}
48
50
 
49
51
 
50
- Hook = Callable[[Extension], AsyncIteratorOrIterator[None]]
52
+ Hook = Callable[[SchemaExtension], AsyncIteratorOrIterator[None]]
51
53
 
52
54
  HOOK_METHODS: Set[str] = {
53
- Extension.on_operation.__name__,
54
- Extension.on_validate.__name__,
55
- Extension.on_parse.__name__,
56
- Extension.on_execute.__name__,
55
+ SchemaExtension.on_operation.__name__,
56
+ SchemaExtension.on_validate.__name__,
57
+ SchemaExtension.on_parse.__name__,
58
+ SchemaExtension.on_execute.__name__,
57
59
  }
@@ -17,7 +17,7 @@ from typing import (
17
17
  Union,
18
18
  )
19
19
 
20
- from strawberry.extensions import Extension
20
+ from strawberry.extensions import SchemaExtension
21
21
  from strawberry.utils.await_maybe import AwaitableOrValue, await_maybe
22
22
 
23
23
  if TYPE_CHECKING:
@@ -27,7 +27,7 @@ if TYPE_CHECKING:
27
27
 
28
28
 
29
29
  class WrappedHook(NamedTuple):
30
- extension: Extension
30
+ extension: SchemaExtension
31
31
  initialized_hook: Union[AsyncIterator[None], Iterator[None]]
32
32
  is_async: bool
33
33
 
@@ -47,15 +47,15 @@ class ExtensionContextManagerBase:
47
47
  LEGACY_ENTER: str
48
48
  LEGACY_EXIT: str
49
49
 
50
- def __init__(self, extensions: List[Extension]):
50
+ def __init__(self, extensions: List[SchemaExtension]):
51
51
  self.hooks: List[WrappedHook] = []
52
- self.default_hook: Hook = getattr(Extension, self.HOOK_NAME)
52
+ self.default_hook: Hook = getattr(SchemaExtension, self.HOOK_NAME)
53
53
  for extension in extensions:
54
54
  hook = self.get_hook(extension)
55
55
  if hook:
56
56
  self.hooks.append(hook)
57
57
 
58
- def get_hook(self, extension: Extension) -> Optional[WrappedHook]:
58
+ def get_hook(self, extension: SchemaExtension) -> Optional[WrappedHook]:
59
59
  on_start = getattr(extension, self.LEGACY_ENTER, None)
60
60
  on_end = getattr(extension, self.LEGACY_EXIT, None)
61
61
 
@@ -90,7 +90,7 @@ class ExtensionContextManagerBase:
90
90
 
91
91
  @staticmethod
92
92
  def from_legacy(
93
- extension: Extension,
93
+ extension: SchemaExtension,
94
94
  on_start: Optional[Callable[[], None]] = None,
95
95
  on_end: Optional[Callable[[], None]] = None,
96
96
  ) -> WrappedHook:
@@ -120,8 +120,8 @@ class ExtensionContextManagerBase:
120
120
 
121
121
  @staticmethod
122
122
  def from_callable(
123
- extension: Extension,
124
- func: Callable[[Extension], AwaitableOrValue[Any]],
123
+ extension: SchemaExtension,
124
+ func: Callable[[SchemaExtension], AwaitableOrValue[Any]],
125
125
  ) -> WrappedHook:
126
126
  if iscoroutinefunction(func):
127
127
 
@@ -151,7 +151,7 @@ class ExtensionContextManagerBase:
151
151
  with ctx:
152
152
  if hook.is_async:
153
153
  raise RuntimeError(
154
- f"Extension hook {hook.extension}.{self.HOOK_NAME} "
154
+ f"SchemaExtension hook {hook.extension}.{self.HOOK_NAME} "
155
155
  "failed to complete synchronously."
156
156
  )
157
157
  else:
@@ -200,24 +200,24 @@ class ExtensionContextManagerBase:
200
200
 
201
201
 
202
202
  class OperationContextManager(ExtensionContextManagerBase):
203
- HOOK_NAME = Extension.on_operation.__name__
203
+ HOOK_NAME = SchemaExtension.on_operation.__name__
204
204
  LEGACY_ENTER = "on_request_start"
205
205
  LEGACY_EXIT = "on_request_end"
206
206
 
207
207
 
208
208
  class ValidationContextManager(ExtensionContextManagerBase):
209
- HOOK_NAME = Extension.on_validate.__name__
209
+ HOOK_NAME = SchemaExtension.on_validate.__name__
210
210
  LEGACY_ENTER = "on_validation_start"
211
211
  LEGACY_EXIT = "on_validation_end"
212
212
 
213
213
 
214
214
  class ParsingContextManager(ExtensionContextManagerBase):
215
- HOOK_NAME = Extension.on_parse.__name__
215
+ HOOK_NAME = SchemaExtension.on_parse.__name__
216
216
  LEGACY_ENTER = "on_parsing_start"
217
217
  LEGACY_EXIT = "on_parsing_end"
218
218
 
219
219
 
220
220
  class ExecutingContextManager(ExtensionContextManagerBase):
221
- HOOK_NAME = Extension.on_execute.__name__
221
+ HOOK_NAME = SchemaExtension.on_execute.__name__
222
222
  LEGACY_ENTER = "on_executing_start"
223
223
  LEGACY_EXIT = "on_executing_end"
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from typing import TYPE_CHECKING, Any, Dict, Tuple
4
4
 
5
- from strawberry.extensions import Extension
5
+ from strawberry.extensions import SchemaExtension
6
6
  from strawberry.types import Info
7
7
  from strawberry.utils.await_maybe import await_maybe
8
8
 
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
18
18
  SPECIFIED_DIRECTIVES = {"include", "skip"}
19
19
 
20
20
 
21
- class DirectivesExtension(Extension):
21
+ class DirectivesExtension(SchemaExtension):
22
22
  async def resolve(
23
23
  self, _next, root, info: GraphQLResolveInfo, *args, **kwargs
24
24
  ) -> AwaitableOrValue[Any]:
@@ -33,7 +33,7 @@ class DirectivesExtension(Extension):
33
33
  return value
34
34
 
35
35
 
36
- class DirectivesExtensionSync(Extension):
36
+ class DirectivesExtensionSync(SchemaExtension):
37
37
  def resolve(
38
38
  self, _next, root, info: GraphQLResolveInfo, *args, **kwargs
39
39
  ) -> AwaitableOrValue[Any]:
@@ -1,9 +1,9 @@
1
1
  from typing import Iterator
2
2
 
3
- from strawberry.extensions.base_extension import Extension
3
+ from strawberry.extensions.base_extension import SchemaExtension
4
4
 
5
5
 
6
- class DisableValidation(Extension):
6
+ class DisableValidation(SchemaExtension):
7
7
  """
8
8
  Disable query validation
9
9
 
@@ -2,7 +2,7 @@ from typing import Callable
2
2
 
3
3
  from graphql.error import GraphQLError
4
4
 
5
- from strawberry.extensions import Extension
5
+ from strawberry.extensions.base_extension import SchemaExtension
6
6
 
7
7
 
8
8
  def default_should_mask_error(_) -> bool:
@@ -10,7 +10,7 @@ def default_should_mask_error(_) -> bool:
10
10
  return True
11
11
 
12
12
 
13
- class MaskErrors(Extension):
13
+ class MaskErrors(SchemaExtension):
14
14
  should_mask_error: Callable[[GraphQLError], bool]
15
15
  error_message: str
16
16
 
@@ -1,11 +1,11 @@
1
1
  from functools import lru_cache
2
2
  from typing import Iterator, Optional
3
3
 
4
- from strawberry.extensions.base_extension import Extension
4
+ from strawberry.extensions.base_extension import SchemaExtension
5
5
  from strawberry.schema.execute import parse_document
6
6
 
7
7
 
8
- class ParserCache(Extension):
8
+ class ParserCache(SchemaExtension):
9
9
  """
10
10
  Add LRU caching the parsing step during execution to improve performance.
11
11
 
@@ -13,31 +13,33 @@ from strawberry.extensions.context import (
13
13
  )
14
14
  from strawberry.utils.await_maybe import await_maybe
15
15
 
16
- from . import Extension
16
+ from . import SchemaExtension
17
17
 
18
18
  if TYPE_CHECKING:
19
19
  from strawberry.types import ExecutionContext
20
20
 
21
21
 
22
- class ExtensionsRunner:
23
- extensions: List[Extension]
22
+ class SchemaExtensionsRunner:
23
+ extensions: List[SchemaExtension]
24
24
 
25
25
  def __init__(
26
26
  self,
27
27
  execution_context: ExecutionContext,
28
- extensions: Optional[List[Union[Type[Extension], Extension]]] = None,
28
+ extensions: Optional[
29
+ List[Union[Type[SchemaExtension], SchemaExtension]]
30
+ ] = None,
29
31
  ):
30
32
  self.execution_context = execution_context
31
33
 
32
34
  if not extensions:
33
35
  extensions = []
34
36
 
35
- init_extensions: List[Extension] = []
37
+ init_extensions: List[SchemaExtension] = []
36
38
 
37
39
  for extension in extensions:
38
40
  # If the extension has already been instantiated then set the
39
41
  # `execution_context` attribute
40
- if isinstance(extension, Extension):
42
+ if isinstance(extension, SchemaExtension):
41
43
  extension.execution_context = execution_context
42
44
  init_extensions.append(extension)
43
45
  else:
@@ -6,7 +6,7 @@ from datetime import datetime
6
6
  from inspect import isawaitable
7
7
  from typing import TYPE_CHECKING, Any, Dict, List, Optional
8
8
 
9
- from strawberry.extensions import Extension
9
+ from strawberry.extensions import SchemaExtension
10
10
  from strawberry.extensions.utils import get_path_from_info
11
11
 
12
12
  from .utils import should_skip_tracing
@@ -76,7 +76,7 @@ class ApolloTracingStats:
76
76
  }
77
77
 
78
78
 
79
- class ApolloTracingExtension(Extension):
79
+ class ApolloTracingExtension(SchemaExtension):
80
80
  def __init__(self, execution_context: ExecutionContext):
81
81
  self._resolver_stats: List[ApolloResolverStats] = []
82
82
  self.execution_context = execution_context
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Iterator, Optional
6
6
 
7
7
  from ddtrace import tracer
8
8
 
9
- from strawberry.extensions import Extension
9
+ from strawberry.extensions import SchemaExtension
10
10
  from strawberry.extensions.tracing.utils import should_skip_tracing
11
11
  from strawberry.utils.cached_property import cached_property
12
12
 
@@ -14,7 +14,7 @@ if TYPE_CHECKING:
14
14
  from strawberry.types.execution import ExecutionContext
15
15
 
16
16
 
17
- class DatadogTracingExtension(Extension):
17
+ class DatadogTracingExtension(SchemaExtension):
18
18
  def __init__(
19
19
  self,
20
20
  *,
@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
8
8
  from opentelemetry import trace
9
9
  from opentelemetry.trace import SpanKind
10
10
 
11
- from strawberry.extensions import Extension
11
+ from strawberry.extensions import SchemaExtension
12
12
  from strawberry.extensions.utils import get_path_from_info
13
13
 
14
14
  from .utils import should_skip_tracing
@@ -31,7 +31,7 @@ class RequestStage(enum.Enum):
31
31
  VALIDATION = enum.auto()
32
32
 
33
33
 
34
- class OpenTelemetryExtension(Extension):
34
+ class OpenTelemetryExtension(SchemaExtension):
35
35
  _arg_filter: Optional[ArgFilter]
36
36
  _span_holder: Dict[RequestStage, Span] = dict()
37
37
  _tracer: Tracer
@@ -1,11 +1,11 @@
1
1
  from functools import lru_cache
2
2
  from typing import Iterator, Optional
3
3
 
4
- from strawberry.extensions.base_extension import Extension
4
+ from strawberry.extensions.base_extension import SchemaExtension
5
5
  from strawberry.schema.execute import validate_document
6
6
 
7
7
 
8
- class ValidationCache(Extension):
8
+ class ValidationCache(SchemaExtension):
9
9
  """
10
10
  Add LRU caching the validation step during execution to improve performance.
11
11
 
@@ -42,7 +42,7 @@ if TYPE_CHECKING:
42
42
 
43
43
  from strawberry.custom_scalar import ScalarDefinition, ScalarWrapper
44
44
  from strawberry.enum import EnumDefinition
45
- from strawberry.extensions import Extension
45
+ from strawberry.extensions import SchemaExtension
46
46
  from strawberry.federation.schema_directives import ComposeDirective
47
47
  from strawberry.schema.config import StrawberryConfig
48
48
  from strawberry.schema.types.concrete_type import TypeMap
@@ -59,7 +59,7 @@ class Schema(BaseSchema):
59
59
  # TODO: we should update directives' type in the main schema
60
60
  directives: Iterable[Type] = (),
61
61
  types: Iterable[Type] = (),
62
- extensions: Iterable[Union[Type["Extension"], "Extension"]] = (),
62
+ extensions: Iterable[Union[Type["SchemaExtension"], "SchemaExtension"]] = (),
63
63
  execution_context_class: Optional[Type["GraphQLExecutionContext"]] = None,
64
64
  config: Optional["StrawberryConfig"] = None,
65
65
  scalar_overrides: Optional[
@@ -374,7 +374,7 @@ def asdict(obj: object) -> Dict[str, object]:
374
374
  >>> # should be {"name": "Lorem", "age": 25}
375
375
  >>> user_dict = strawberry.asdict(User(name="Lorem", age=25))
376
376
  """
377
- return dataclasses.asdict(obj)
377
+ return dataclasses.asdict(obj) # type: ignore
378
378
 
379
379
 
380
380
  __all__ = [
@@ -21,7 +21,7 @@ from graphql import execute as original_execute
21
21
  from graphql.validation import validate
22
22
 
23
23
  from strawberry.exceptions import MissingQueryError
24
- from strawberry.extensions.runner import ExtensionsRunner
24
+ from strawberry.extensions.runner import SchemaExtensionsRunner
25
25
  from strawberry.types import ExecutionResult
26
26
 
27
27
  from .exceptions import InvalidOperationTypeError
@@ -33,7 +33,7 @@ if TYPE_CHECKING:
33
33
  from graphql.language import DocumentNode
34
34
  from graphql.validation import ASTValidationRule
35
35
 
36
- from strawberry.extensions import Extension
36
+ from strawberry.extensions import SchemaExtension
37
37
  from strawberry.types import ExecutionContext
38
38
  from strawberry.types.graphql import OperationType
39
39
 
@@ -70,12 +70,12 @@ async def execute(
70
70
  schema: GraphQLSchema,
71
71
  *,
72
72
  allowed_operation_types: Iterable[OperationType],
73
- extensions: Sequence[Union[Type[Extension], Extension]],
73
+ extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
74
74
  execution_context: ExecutionContext,
75
75
  execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
76
76
  process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
77
77
  ) -> ExecutionResult:
78
- extensions_runner = ExtensionsRunner(
78
+ extensions_runner = SchemaExtensionsRunner(
79
79
  execution_context=execution_context,
80
80
  extensions=list(extensions),
81
81
  )
@@ -163,12 +163,12 @@ def execute_sync(
163
163
  schema: GraphQLSchema,
164
164
  *,
165
165
  allowed_operation_types: Iterable[OperationType],
166
- extensions: Sequence[Union[Type[Extension], Extension]],
166
+ extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
167
167
  execution_context: ExecutionContext,
168
168
  execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
169
169
  process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
170
170
  ) -> ExecutionResult:
171
- extensions_runner = ExtensionsRunner(
171
+ extensions_runner = SchemaExtensionsRunner(
172
172
  execution_context=execution_context,
173
173
  extensions=list(extensions),
174
174
  )
@@ -37,7 +37,7 @@ if TYPE_CHECKING:
37
37
  from strawberry.custom_scalar import ScalarDefinition, ScalarWrapper
38
38
  from strawberry.directive import StrawberryDirective
39
39
  from strawberry.enum import EnumDefinition
40
- from strawberry.extensions import Extension
40
+ from strawberry.extensions import SchemaExtension
41
41
  from strawberry.field import StrawberryField
42
42
  from strawberry.types import ExecutionResult
43
43
  from strawberry.union import StrawberryUnion
@@ -59,7 +59,7 @@ class Schema(BaseSchema):
59
59
  subscription: Optional[Type] = None,
60
60
  directives: Iterable[StrawberryDirective] = (),
61
61
  types=(),
62
- extensions: Iterable[Union[Type[Extension], Extension]] = (),
62
+ extensions: Iterable[Union[Type[SchemaExtension], SchemaExtension]] = (),
63
63
  execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
64
64
  config: Optional[StrawberryConfig] = None,
65
65
  scalar_overrides: Optional[
@@ -157,7 +157,7 @@ class Schema(BaseSchema):
157
157
 
158
158
  def get_extensions(
159
159
  self, sync: bool = False
160
- ) -> List[Union[Type[Extension], Extension]]:
160
+ ) -> List[Union[Type[SchemaExtension], SchemaExtension]]:
161
161
  extensions = list(self.extensions)
162
162
 
163
163
  if self.directives:
@@ -1,105 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- packages = \
5
- ['strawberry',
6
- 'strawberry.aiohttp',
7
- 'strawberry.aiohttp.handlers',
8
- 'strawberry.aiohttp.test',
9
- 'strawberry.asgi',
10
- 'strawberry.asgi.handlers',
11
- 'strawberry.asgi.test',
12
- 'strawberry.chalice',
13
- 'strawberry.channels',
14
- 'strawberry.channels.handlers',
15
- 'strawberry.cli',
16
- 'strawberry.cli.commands',
17
- 'strawberry.cli.utils',
18
- 'strawberry.codegen',
19
- 'strawberry.codegen.plugins',
20
- 'strawberry.django',
21
- 'strawberry.django.test',
22
- 'strawberry.exceptions',
23
- 'strawberry.exceptions.utils',
24
- 'strawberry.experimental',
25
- 'strawberry.experimental.pydantic',
26
- 'strawberry.ext',
27
- 'strawberry.ext.dataclasses',
28
- 'strawberry.extensions',
29
- 'strawberry.extensions.tracing',
30
- 'strawberry.fastapi',
31
- 'strawberry.fastapi.handlers',
32
- 'strawberry.federation',
33
- 'strawberry.file_uploads',
34
- 'strawberry.flask',
35
- 'strawberry.http',
36
- 'strawberry.printer',
37
- 'strawberry.sanic',
38
- 'strawberry.schema',
39
- 'strawberry.schema.types',
40
- 'strawberry.subscriptions',
41
- 'strawberry.subscriptions.protocols',
42
- 'strawberry.subscriptions.protocols.graphql_transport_ws',
43
- 'strawberry.subscriptions.protocols.graphql_ws',
44
- 'strawberry.test',
45
- 'strawberry.tools',
46
- 'strawberry.types',
47
- 'strawberry.types.fields',
48
- 'strawberry.utils']
49
-
50
- package_data = \
51
- {'': ['*'], 'strawberry': ['static/*']}
52
-
53
- install_requires = \
54
- ['graphql-core>=3.2.0,<3.3.0',
55
- 'python-dateutil>=2.7.0,<3.0.0',
56
- 'typing_extensions>=3.7.4,<5.0.0']
57
-
58
- extras_require = \
59
- {':python_version < "3.8"': ['backports.cached-property>=1.0.2,<2.0.0'],
60
- 'aiohttp': ['aiohttp>=3.7.4.post0,<4.0.0'],
61
- 'asgi': ['starlette>=0.13.6', 'python-multipart>=0.0.5,<0.0.6'],
62
- 'chalice': ['chalice>=1.22,<2.0'],
63
- 'channels': ['asgiref>=3.2,<4.0', 'channels>=3.0.5'],
64
- 'cli': ['click>=7.0,<9.0',
65
- 'pygments>=2.3,<3.0',
66
- 'libcst>=0.4.7',
67
- 'rich>=12.0.0'],
68
- 'debug': ['libcst>=0.4.7', 'rich>=12.0.0'],
69
- 'debug-server': ['starlette>=0.13.6',
70
- 'click>=7.0,<9.0',
71
- 'pygments>=2.3,<3.0',
72
- 'uvicorn>=0.11.6,<0.21.0',
73
- 'python-multipart>=0.0.5,<0.0.6',
74
- 'libcst>=0.4.7',
75
- 'rich>=12.0.0'],
76
- 'django': ['Django>=3.2', 'asgiref>=3.2,<4.0'],
77
- 'fastapi': ['python-multipart>=0.0.5,<0.0.6', 'fastapi>=0.65.2'],
78
- 'flask': ['flask>=1.1'],
79
- 'opentelemetry': ['opentelemetry-api<2', 'opentelemetry-sdk<2'],
80
- 'pydantic': ['pydantic<2'],
81
- 'sanic': ['sanic>=20.12.2']}
82
-
83
- entry_points = \
84
- {'console_scripts': ['strawberry = strawberry.cli:run']}
85
-
86
- setup_kwargs = {
87
- 'name': 'strawberry-graphql',
88
- 'version': '0.159.0',
89
- 'description': 'A library for creating GraphQL APIs',
90
- 'long_description': '<img src="https://github.com/strawberry-graphql/strawberry/raw/main/.github/logo.png" width="124" height="150">\n\n# Strawberry GraphQL\n\n> Python GraphQL library based on dataclasses\n\n[![CircleCI](https://img.shields.io/circleci/token/307b40d5e152e074d34f84d30d226376a15667d5/project/github/strawberry-graphql/strawberry/main.svg?style=for-the-badge)](https://circleci.com/gh/strawberry-graphql/strawberry/tree/main)\n[![Discord](https://img.shields.io/discord/689806334337482765?label=discord&logo=discord&logoColor=white&style=for-the-badge&color=blue)](https://discord.gg/ZkRTEJQ)\n[![PyPI](https://img.shields.io/pypi/v/strawberry-graphql?logo=pypi&logoColor=white&style=for-the-badge)](https://pypi.org/project/strawberry-graphql/)\n\n## Installation ( Quick Start )\n\nThe quick start method provides a server and CLI to get going quickly. Install\nwith:\n\n```shell\npip install "strawberry-graphql[debug-server]"\n```\n\n## Getting Started\n\nCreate a file called `app.py` with the following code:\n\n```python\nimport strawberry\n\n\n@strawberry.type\nclass User:\n name: str\n age: int\n\n\n@strawberry.type\nclass Query:\n @strawberry.field\n def user(self) -> User:\n return User(name="Patrick", age=100)\n\n\nschema = strawberry.Schema(query=Query)\n```\n\nThis will create a GraphQL schema defining a `User` type and a single query\nfield `user` that will return a hardcoded user.\n\nTo run the debug server run the following command:\n\n```shell\nstrawberry server app\n```\n\nOpen the debug server by clicking on the following link:\n[http://0.0.0.0:8000/graphql](http://0.0.0.0:8000/graphql)\n\nThis will open GraphiQL where you can test the API.\n\n### Type-checking\n\nStrawberry comes with a [mypy] plugin that enables statically type-checking your\nGraphQL schema. To enable it, add the following lines to your `mypy.ini`\nconfiguration:\n\n```ini\n[mypy]\nplugins = strawberry.ext.mypy_plugin\n```\n\n[mypy]: http://www.mypy-lang.org/\n\n### Django Integration\n\nA Django view is provided for adding a GraphQL endpoint to your application.\n\n1. Add the app to your `INSTALLED_APPS`.\n\n```python\nINSTALLED_APPS = [\n ..., # your other apps\n "strawberry.django",\n]\n```\n\n2. Add the view to your `urls.py` file.\n\n```python\nfrom strawberry.django.views import GraphQLView\nfrom .schema import schema\n\nurlpatterns = [\n ...,\n path("graphql", GraphQLView.as_view(schema=schema)),\n]\n```\n\n## WebSockets\n\nTo support graphql Subscriptions over WebSockets you need to provide a WebSocket\nenabled server. The debug server can be made to support WebSockets with these\ncommands:\n\n```shell\npip install \'strawberry-graphql[debug-server]\'\npip install \'uvicorn[standard]\'\n```\n\n## Examples\n\n* [Various examples on how to use Strawberry](https://github.com/strawberry-graphql/examples)\n* [Full stack example using Starlette, SQLAlchemy, Typescript codegen and Next.js](https://github.com/jokull/python-ts-graphql-demo)\n* [Quart + Strawberry tutorial](https://github.com/rockyburt/Ketchup)\n\n## Contributing\n\nWe use [poetry](https://github.com/sdispater/poetry) to manage dependencies, to\nget started follow these steps:\n\n```shell\ngit clone https://github.com/strawberry-graphql/strawberry\ncd strawberry\npoetry install\npoetry run pytest\n```\n\nThis will install all the dependencies (including dev ones) and run the tests.\n\n### Pre commit\n\nWe have a configuration for\n[pre-commit](https://github.com/pre-commit/pre-commit), to add the hook run the\nfollowing command:\n\n```shell\npre-commit install\n```\n\n## Links\n\n- Project homepage: https://strawberry.rocks\n- Repository: https://github.com/strawberry-graphql/strawberry\n- Issue tracker: https://github.com/strawberry-graphql/strawberry/issues\n - In case of sensitive bugs like security vulnerabilities, please contact\n patrick.arminio@gmail.com directly instead of using the issue tracker. We\n value your effort to improve the security and privacy of this project!\n\n## Licensing\n\nThe code in this project is licensed under MIT license. See [LICENSE](./LICENSE)\nfor more information.\n\n![Recent Activity](https://images.repography.com/0/strawberry-graphql/strawberry/recent-activity/d751713988987e9331980363e24189ce.svg)\n',
91
- 'author': 'Patrick Arminio',
92
- 'author_email': 'patrick.arminio@gmail.com',
93
- 'maintainer': 'None',
94
- 'maintainer_email': 'None',
95
- 'url': 'https://strawberry.rocks/',
96
- 'packages': packages,
97
- 'package_data': package_data,
98
- 'install_requires': install_requires,
99
- 'extras_require': extras_require,
100
- 'entry_points': entry_points,
101
- 'python_requires': '>=3.7,<4.0',
102
- }
103
-
104
-
105
- setup(**setup_kwargs)
@@ -1,17 +0,0 @@
1
- from .add_validation_rules import AddValidationRules
2
- from .base_extension import Extension
3
- from .disable_validation import DisableValidation
4
- from .mask_errors import MaskErrors
5
- from .parser_cache import ParserCache
6
- from .query_depth_limiter import QueryDepthLimiter
7
- from .validation_cache import ValidationCache
8
-
9
- __all__ = [
10
- "Extension",
11
- "AddValidationRules",
12
- "DisableValidation",
13
- "ParserCache",
14
- "QueryDepthLimiter",
15
- "ValidationCache",
16
- "MaskErrors",
17
- ]