strawberry-graphql 0.214.0__tar.gz → 0.214.0.dev1701082152__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 (243) hide show
  1. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/pyproject.toml +3 -3
  3. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/chalice/views.py +1 -1
  4. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/query_codegen.py +1 -1
  5. strawberry_graphql-0.214.0.dev1701082152/strawberry/schema/execute.py +266 -0
  6. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/graphiql.html +6 -6
  7. strawberry_graphql-0.214.0/strawberry/schema/execute.py +0 -263
  8. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/LICENSE +0 -0
  9. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/README.md +0 -0
  10. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/__init__.py +0 -0
  11. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/__main__.py +0 -0
  12. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/__init__.py +0 -0
  13. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/__init__.py +0 -0
  14. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +0 -0
  15. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/handlers/graphql_ws_handler.py +0 -0
  16. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/test/__init__.py +0 -0
  17. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/test/client.py +0 -0
  18. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/aiohttp/views.py +0 -0
  19. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/annotation.py +0 -0
  20. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/arguments.py +0 -0
  21. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/__init__.py +0 -0
  22. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/__init__.py +0 -0
  23. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +0 -0
  24. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/handlers/graphql_ws_handler.py +0 -0
  25. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/test/__init__.py +0 -0
  26. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/asgi/test/client.py +0 -0
  27. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/auto.py +0 -0
  28. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/chalice/__init__.py +0 -0
  29. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/__init__.py +0 -0
  30. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/base.py +0 -0
  31. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/graphql_transport_ws_handler.py +0 -0
  32. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/graphql_ws_handler.py +0 -0
  33. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/http_handler.py +0 -0
  34. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/handlers/ws_handler.py +0 -0
  35. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/router.py +0 -0
  36. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/channels/testing.py +0 -0
  37. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/__init__.py +0 -0
  38. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/app.py +0 -0
  39. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/__init__.py +0 -0
  40. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/codegen.py +0 -0
  41. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/export_schema.py +0 -0
  42. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/schema_codegen.py +0 -0
  43. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/server.py +0 -0
  44. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  45. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  46. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  47. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/constants.py +0 -0
  48. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/debug_server.py +0 -0
  49. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/utils/__init__.py +0 -0
  50. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/cli/utils/load_schema.py +0 -0
  51. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/__init__.py +0 -0
  52. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/exceptions.py +0 -0
  53. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/__init__.py +0 -0
  54. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/print_operation.py +0 -0
  55. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/python.py +0 -0
  56. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/plugins/typescript.py +0 -0
  57. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codegen/types.py +0 -0
  58. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codemods/__init__.py +0 -0
  59. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/codemods/annotated_unions.py +0 -0
  60. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/custom_scalar.py +0 -0
  61. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/dataloader.py +0 -0
  62. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/directive.py +0 -0
  63. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/__init__.py +0 -0
  64. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/apps.py +0 -0
  65. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/context.py +0 -0
  66. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/test/__init__.py +0 -0
  67. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/test/client.py +0 -0
  68. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/django/views.py +0 -0
  69. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/enum.py +0 -0
  70. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/__init__.py +0 -0
  71. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/conflicting_arguments.py +0 -0
  72. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/duplicated_type_name.py +0 -0
  73. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/exception.py +0 -0
  74. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/exception_source.py +0 -0
  75. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/handler.py +0 -0
  76. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/invalid_argument_type.py +0 -0
  77. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/invalid_union_type.py +0 -0
  78. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_arguments_annotations.py +0 -0
  79. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_field_annotation.py +0 -0
  80. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/missing_return_annotation.py +0 -0
  81. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/not_a_strawberry_enum.py +0 -0
  82. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/object_is_not_a_class.py +0 -0
  83. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/object_is_not_an_enum.py +0 -0
  84. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/private_strawberry_field.py +0 -0
  85. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/scalar_already_registered.py +0 -0
  86. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/syntax.py +0 -0
  87. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/unresolved_field_type.py +0 -0
  88. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/utils/__init__.py +0 -0
  89. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/exceptions/utils/source_finder.py +0 -0
  90. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/__init__.py +0 -0
  91. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/__init__.py +0 -0
  92. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/_compat.py +0 -0
  93. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/conversion.py +0 -0
  94. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/conversion_types.py +0 -0
  95. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/error_type.py +0 -0
  96. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/exceptions.py +0 -0
  97. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/fields.py +0 -0
  98. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/object_type.py +0 -0
  99. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/experimental/pydantic/utils.py +0 -0
  100. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/LICENSE +0 -0
  101. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/__init__.py +0 -0
  102. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/LICENSE +0 -0
  103. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/__init__.py +0 -0
  104. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  105. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/ext/mypy_plugin.py +0 -0
  106. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/__init__.py +0 -0
  107. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/add_validation_rules.py +0 -0
  108. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/base_extension.py +0 -0
  109. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/context.py +0 -0
  110. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/directives.py +0 -0
  111. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/disable_validation.py +0 -0
  112. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/field_extension.py +0 -0
  113. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/mask_errors.py +0 -0
  114. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/max_aliases.py +0 -0
  115. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/max_tokens.py +0 -0
  116. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/parser_cache.py +0 -0
  117. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/pyinstrument.py +0 -0
  118. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/query_depth_limiter.py +0 -0
  119. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/runner.py +0 -0
  120. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/__init__.py +0 -0
  121. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/apollo.py +0 -0
  122. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/datadog.py +0 -0
  123. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/opentelemetry.py +0 -0
  124. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/sentry.py +0 -0
  125. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/tracing/utils.py +0 -0
  126. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/utils.py +0 -0
  127. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/extensions/validation_cache.py +0 -0
  128. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/__init__.py +0 -0
  129. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/context.py +0 -0
  130. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/__init__.py +0 -0
  131. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
  132. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
  133. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/fastapi/router.py +0 -0
  134. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/__init__.py +0 -0
  135. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/argument.py +0 -0
  136. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/enum.py +0 -0
  137. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/field.py +0 -0
  138. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/mutation.py +0 -0
  139. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/object_type.py +0 -0
  140. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/scalar.py +0 -0
  141. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema.py +0 -0
  142. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema_directive.py +0 -0
  143. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/schema_directives.py +0 -0
  144. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/types.py +0 -0
  145. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/federation/union.py +0 -0
  146. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field.py +0 -0
  147. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field_extensions/__init__.py +0 -0
  148. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/field_extensions/input_mutation.py +0 -0
  149. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/__init__.py +0 -0
  150. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/scalars.py +0 -0
  151. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/file_uploads/utils.py +0 -0
  152. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/flask/__init__.py +0 -0
  153. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/flask/views.py +0 -0
  154. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/__init__.py +0 -0
  155. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/async_base_view.py +0 -0
  156. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/base.py +0 -0
  157. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/exceptions.py +0 -0
  158. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/ides.py +0 -0
  159. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/sync_base_view.py +0 -0
  160. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/temporal_response.py +0 -0
  161. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/types.py +0 -0
  162. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/http/typevars.py +0 -0
  163. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/lazy_type.py +0 -0
  164. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/mutation.py +0 -0
  165. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/object_type.py +0 -0
  166. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/parent.py +0 -0
  167. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/permission.py +0 -0
  168. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/__init__.py +0 -0
  169. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/ast_from_value.py +0 -0
  170. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/printer/printer.py +0 -0
  171. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/private.py +0 -0
  172. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/py.typed +0 -0
  173. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/quart/__init__.py +0 -0
  174. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/quart/views.py +0 -0
  175. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/__init__.py +0 -0
  176. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/exceptions.py +0 -0
  177. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/fields.py +0 -0
  178. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/types.py +0 -0
  179. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/relay/utils.py +0 -0
  180. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/resolvers.py +0 -0
  181. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/__init__.py +0 -0
  182. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/context.py +0 -0
  183. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/utils.py +0 -0
  184. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/sanic/views.py +0 -0
  185. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/scalars.py +0 -0
  186. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/__init__.py +0 -0
  187. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/base.py +0 -0
  188. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/compat.py +0 -0
  189. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/config.py +0 -0
  190. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/exceptions.py +0 -0
  191. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/name_converter.py +0 -0
  192. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/schema.py +0 -0
  193. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/schema_converter.py +0 -0
  194. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/__init__.py +0 -0
  195. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/base_scalars.py +0 -0
  196. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/concrete_type.py +0 -0
  197. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema/types/scalar.py +0 -0
  198. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema_codegen/__init__.py +0 -0
  199. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/schema_directive.py +0 -0
  200. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/__init__.py +0 -0
  201. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/controller.py +0 -0
  202. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +0 -0
  203. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/starlite/handlers/graphql_ws_handler.py +0 -0
  204. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/apollo-sandbox.html +0 -0
  205. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/static/pathfinder.html +0 -0
  206. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/__init__.py +0 -0
  207. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/__init__.py +0 -0
  208. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  209. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +0 -0
  210. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  211. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  212. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +0 -0
  213. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  214. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/test/__init__.py +0 -0
  215. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/test/client.py +0 -0
  216. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/__init__.py +0 -0
  217. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/create_type.py +0 -0
  218. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/tools/merge_types.py +0 -0
  219. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/type.py +0 -0
  220. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/__init__.py +0 -0
  221. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/execution.py +0 -0
  222. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/fields/__init__.py +0 -0
  223. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/fields/resolver.py +0 -0
  224. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/graphql.py +0 -0
  225. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/info.py +0 -0
  226. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/nodes.py +0 -0
  227. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/type_resolver.py +0 -0
  228. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/types/types.py +0 -0
  229. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/union.py +0 -0
  230. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/unset.py +0 -0
  231. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/__init__.py +0 -0
  232. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/aio.py +0 -0
  233. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/await_maybe.py +0 -0
  234. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/dataclasses.py +0 -0
  235. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/debug.py +0 -0
  236. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/deprecations.py +0 -0
  237. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/graphql_lexer.py +0 -0
  238. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/importer.py +0 -0
  239. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/inspect.py +0 -0
  240. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/logging.py +0 -0
  241. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/operation.py +0 -0
  242. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/str_converters.py +0 -0
  243. {strawberry_graphql-0.214.0 → strawberry_graphql-0.214.0.dev1701082152}/strawberry/utils/typing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.214.0
3
+ Version: 0.214.0.dev1701082152
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.214.0"
4
+ version = "0.214.0.dev.1701082152"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -96,8 +96,8 @@ types-toml = "^0.10.8"
96
96
  types-typed-ast = "^1.5.8"
97
97
  types-ujson = "^5.6.0"
98
98
  # added this here manually because poetry doesn't seem to be able to handle it =(
99
- botocore = "1.31.84"
100
- mypy = "1.7.0"
99
+ botocore = "1.31.75"
100
+ mypy = "1.6.1"
101
101
  pytest-mypy-plugins = ">=1.10,<4.0"
102
102
  types-protobuf = "^4.23.0.1"
103
103
 
@@ -22,7 +22,7 @@ class ChaliceHTTPRequestAdapter(SyncHTTPRequestAdapter):
22
22
 
23
23
  @property
24
24
  def query_params(self) -> QueryParams:
25
- return self.request.query_params or {}
25
+ return self.request.query_params or {} # type: ignore
26
26
 
27
27
  @property
28
28
  def body(self) -> Union[str, bytes]:
@@ -660,7 +660,7 @@ class QueryCodegen:
660
660
  elif isinstance(type_, StrawberryList):
661
661
  type_, wrapper = self._unwrap_type(type_.of_type)
662
662
  wrapper = (
663
- GraphQLList if wrapper is None else lambda t: GraphQLList(wrapper(t))
663
+ GraphQLList if wrapper is None else lambda t: GraphQLList(wrapper(t)) # type: ignore[misc]
664
664
  )
665
665
 
666
666
  elif isinstance(type_, LazyType):
@@ -0,0 +1,266 @@
1
+ from __future__ import annotations
2
+
3
+ from asyncio import ensure_future
4
+ from inspect import isawaitable
5
+ from typing import (
6
+ TYPE_CHECKING,
7
+ Awaitable,
8
+ Callable,
9
+ Iterable,
10
+ List,
11
+ Optional,
12
+ Sequence,
13
+ Tuple,
14
+ Type,
15
+ TypedDict,
16
+ Union,
17
+ cast,
18
+ )
19
+
20
+ from graphql import GraphQLError, parse
21
+ from graphql import execute as original_execute
22
+ from graphql.validation import validate
23
+
24
+ from strawberry.exceptions import MissingQueryError
25
+ from strawberry.extensions.runner import SchemaExtensionsRunner
26
+ from strawberry.types import ExecutionResult
27
+
28
+ from .exceptions import InvalidOperationTypeError
29
+
30
+ if TYPE_CHECKING:
31
+ from typing_extensions import NotRequired, Unpack
32
+
33
+ from graphql import ExecutionContext as GraphQLExecutionContext
34
+ from graphql import ExecutionResult as GraphQLExecutionResult
35
+ from graphql import GraphQLSchema
36
+ from graphql.language import DocumentNode
37
+ from graphql.validation import ASTValidationRule
38
+
39
+ from strawberry.extensions import SchemaExtension
40
+ from strawberry.types import ExecutionContext
41
+ from strawberry.types.graphql import OperationType
42
+
43
+
44
+ # duplicated because of https://github.com/mkdocstrings/griffe-typingdoc/issues/7
45
+ class ParseOptions(TypedDict):
46
+ max_tokens: NotRequired[int]
47
+
48
+
49
+ def parse_document(query: str, **kwargs: Unpack[ParseOptions]) -> DocumentNode:
50
+ return parse(query, **kwargs)
51
+
52
+
53
+ def validate_document(
54
+ schema: GraphQLSchema,
55
+ document: DocumentNode,
56
+ validation_rules: Tuple[Type[ASTValidationRule], ...],
57
+ ) -> List[GraphQLError]:
58
+ return validate(
59
+ schema,
60
+ document,
61
+ validation_rules,
62
+ )
63
+
64
+
65
+ def _run_validation(execution_context: ExecutionContext) -> None:
66
+ # Check if there are any validation rules or if validation has
67
+ # already been run by an extension
68
+ if len(execution_context.validation_rules) > 0 and execution_context.errors is None:
69
+ assert execution_context.graphql_document
70
+ execution_context.errors = validate_document(
71
+ execution_context.schema._schema,
72
+ execution_context.graphql_document,
73
+ execution_context.validation_rules,
74
+ )
75
+
76
+
77
+ async def execute(
78
+ schema: GraphQLSchema,
79
+ *,
80
+ allowed_operation_types: Iterable[OperationType],
81
+ extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
82
+ execution_context: ExecutionContext,
83
+ execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
84
+ process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
85
+ ) -> ExecutionResult:
86
+ extensions_runner = SchemaExtensionsRunner(
87
+ execution_context=execution_context,
88
+ extensions=list(extensions),
89
+ )
90
+
91
+ try:
92
+ async with extensions_runner.operation():
93
+ # Note: In graphql-core the schema would be validated here but in
94
+ # Strawberry we are validating it at initialisation time instead
95
+ if not execution_context.query:
96
+ raise MissingQueryError()
97
+
98
+ async with extensions_runner.parsing():
99
+ try:
100
+ if not execution_context.graphql_document:
101
+ execution_context.graphql_document = parse_document(
102
+ execution_context.query, **execution_context.parse_options
103
+ )
104
+
105
+ except GraphQLError as exc:
106
+ execution_context.errors = [exc]
107
+ process_errors([exc], execution_context)
108
+ return ExecutionResult(
109
+ data=None,
110
+ errors=[exc],
111
+ extensions=await extensions_runner.get_extensions_results(),
112
+ )
113
+
114
+ if execution_context.operation_type not in allowed_operation_types:
115
+ raise InvalidOperationTypeError(execution_context.operation_type)
116
+
117
+ async with extensions_runner.validation():
118
+ _run_validation(execution_context)
119
+ if execution_context.errors:
120
+ process_errors(execution_context.errors, execution_context)
121
+ return ExecutionResult(data=None, errors=execution_context.errors)
122
+
123
+ async with extensions_runner.executing():
124
+ if not execution_context.result:
125
+ result = original_execute(
126
+ schema,
127
+ execution_context.graphql_document,
128
+ root_value=execution_context.root_value,
129
+ middleware=extensions_runner.as_middleware_manager(),
130
+ variable_values=execution_context.variables,
131
+ operation_name=execution_context.operation_name,
132
+ context_value=execution_context.context,
133
+ execution_context_class=execution_context_class,
134
+ )
135
+
136
+ if isawaitable(result):
137
+ result = await cast(Awaitable["GraphQLExecutionResult"], result)
138
+
139
+ result = cast("GraphQLExecutionResult", result)
140
+ execution_context.result = result
141
+ # Also set errors on the execution_context so that it's easier
142
+ # to access in extensions
143
+ if result.errors:
144
+ execution_context.errors = result.errors
145
+
146
+ # Run the `Schema.process_errors` function here before
147
+ # extensions have a chance to modify them (see the MaskErrors
148
+ # extension). That way we can log the original errors but
149
+ # only return a sanitised version to the client.
150
+ process_errors(result.errors, execution_context)
151
+
152
+ except (MissingQueryError, InvalidOperationTypeError) as e:
153
+ raise e
154
+ except Exception as exc:
155
+ error = GraphQLError(str(exc), original_error=exc)
156
+ execution_context.errors = [error]
157
+ process_errors([error], execution_context)
158
+ return ExecutionResult(
159
+ data=None,
160
+ errors=[error],
161
+ extensions=await extensions_runner.get_extensions_results(),
162
+ )
163
+
164
+ return ExecutionResult(
165
+ data=execution_context.result.data,
166
+ errors=execution_context.result.errors,
167
+ extensions=await extensions_runner.get_extensions_results(),
168
+ )
169
+
170
+
171
+ def execute_sync(
172
+ schema: GraphQLSchema,
173
+ *,
174
+ allowed_operation_types: Iterable[OperationType],
175
+ extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
176
+ execution_context: ExecutionContext,
177
+ execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
178
+ process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
179
+ ) -> ExecutionResult:
180
+ extensions_runner = SchemaExtensionsRunner(
181
+ execution_context=execution_context,
182
+ extensions=list(extensions),
183
+ )
184
+
185
+ try:
186
+ with extensions_runner.operation():
187
+ # Note: In graphql-core the schema would be validated here but in
188
+ # Strawberry we are validating it at initialisation time instead
189
+ if not execution_context.query:
190
+ raise MissingQueryError()
191
+
192
+ with extensions_runner.parsing():
193
+ try:
194
+ if not execution_context.graphql_document:
195
+ execution_context.graphql_document = parse_document(
196
+ execution_context.query, **execution_context.parse_options
197
+ )
198
+
199
+ except GraphQLError as exc:
200
+ execution_context.errors = [exc]
201
+ process_errors([exc], execution_context)
202
+ return ExecutionResult(
203
+ data=None,
204
+ errors=[exc],
205
+ extensions=extensions_runner.get_extensions_results_sync(),
206
+ )
207
+
208
+ if execution_context.operation_type not in allowed_operation_types:
209
+ raise InvalidOperationTypeError(execution_context.operation_type)
210
+
211
+ with extensions_runner.validation():
212
+ _run_validation(execution_context)
213
+ if execution_context.errors:
214
+ process_errors(execution_context.errors, execution_context)
215
+ return ExecutionResult(data=None, errors=execution_context.errors)
216
+
217
+ with extensions_runner.executing():
218
+ if not execution_context.result:
219
+ result = original_execute(
220
+ schema,
221
+ execution_context.graphql_document,
222
+ root_value=execution_context.root_value,
223
+ middleware=extensions_runner.as_middleware_manager(),
224
+ variable_values=execution_context.variables,
225
+ operation_name=execution_context.operation_name,
226
+ context_value=execution_context.context,
227
+ execution_context_class=execution_context_class,
228
+ )
229
+
230
+ if isawaitable(result):
231
+ result = cast(Awaitable["GraphQLExecutionResult"], result)
232
+ ensure_future(result).cancel()
233
+ raise RuntimeError(
234
+ "GraphQL execution failed to complete synchronously."
235
+ )
236
+
237
+ result = cast("GraphQLExecutionResult", result)
238
+ execution_context.result = result
239
+ # Also set errors on the execution_context so that it's easier
240
+ # to access in extensions
241
+ if result.errors:
242
+ execution_context.errors = result.errors
243
+
244
+ # Run the `Schema.process_errors` function here before
245
+ # extensions have a chance to modify them (see the MaskErrors
246
+ # extension). That way we can log the original errors but
247
+ # only return a sanitised version to the client.
248
+ process_errors(result.errors, execution_context)
249
+
250
+ except (MissingQueryError, InvalidOperationTypeError) as e:
251
+ raise e
252
+ except Exception as exc:
253
+ error = GraphQLError(str(exc), original_error=exc)
254
+ execution_context.errors = [error]
255
+ process_errors([error], execution_context)
256
+ return ExecutionResult(
257
+ data=None,
258
+ errors=[error],
259
+ extensions=extensions_runner.get_extensions_results_sync(),
260
+ )
261
+
262
+ return ExecutionResult(
263
+ data=execution_context.result.data,
264
+ errors=execution_context.result.errors,
265
+ extensions=extensions_runner.get_extensions_results_sync(),
266
+ )
@@ -61,15 +61,15 @@
61
61
  <link
62
62
  crossorigin
63
63
  rel="stylesheet"
64
- href="https://unpkg.com/graphiql@3.0.9/graphiql.min.css"
64
+ href="https://unpkg.com/graphiql@3.0.5/graphiql.min.css"
65
65
  integrity="sha384-yz3/sqpuplkA7msMo0FE4ekg0xdwdvZ8JX9MVZREsxipqjU4h8IRfmAMRcb1QpUy"
66
66
  />
67
67
 
68
68
  <link
69
69
  crossorigin
70
70
  rel="stylesheet"
71
- href="https://unpkg.com/@graphiql/plugin-explorer@1.0.2/dist/style.css"
72
- integrity="sha384-5DFJlDPW2tSATRbM8kzoP1j194jexLswuNmClWoRr2Q0x7R68JIQzPHZ02Faktwi"
71
+ href="https://unpkg.com/@graphiql/plugin-explorer@0.3.4/dist/style.css"
72
+ integrity="sha384-kOrlMT58B3t0hTVIPFqWyg1oL4DKvxHNcC1X2qugv4fXd9ehKULhhjDLvBi3HoEK"
73
73
  />
74
74
  </head>
75
75
 
@@ -77,12 +77,12 @@
77
77
  <div id="graphiql" class="graphiql-container">Loading...</div>
78
78
  <script
79
79
  crossorigin
80
- src="https://unpkg.com/graphiql@3.0.9/graphiql.min.js"
81
- integrity="sha384-Mjte+vxCWz1ZYCzszGHiJqJa5eAxiqI4mc3BErq7eDXnt+UGLXSEW7+i0wmfPiji"
80
+ src="https://unpkg.com/graphiql@3.0.5/graphiql.min.js"
81
+ integrity="sha384-M+Ed4RZlnWvJ8keiTju1xlV6xM5tB9tLTfoSdWPDVrK4aOOpavtruK9pz/dfuCZ/"
82
82
  ></script>
83
83
  <script
84
84
  crossorigin
85
- src="https://unpkg.com/@graphiql/plugin-explorer@1.0.2/dist/index.umd.js"
85
+ src="https://unpkg.com/@graphiql/plugin-explorer@0.3.4/dist/index.umd.js"
86
86
  integrity="sha384-2oonKe47vfHIZnmB6ZZ10vl7T0Y+qrHQF2cmNTaFDuPshpKqpUMGMc9jgj9MLDZ9"
87
87
  ></script>
88
88
  <script>
@@ -1,263 +0,0 @@
1
- from __future__ import annotations
2
-
3
- from asyncio import ensure_future
4
- from inspect import isawaitable
5
- from typing import (
6
- TYPE_CHECKING,
7
- Awaitable,
8
- Callable,
9
- Iterable,
10
- List,
11
- Optional,
12
- Sequence,
13
- Tuple,
14
- Type,
15
- TypedDict,
16
- Union,
17
- cast,
18
- )
19
-
20
- from graphql import GraphQLError, parse
21
- from graphql import execute as original_execute
22
- from graphql.validation import validate
23
-
24
- from strawberry.exceptions import MissingQueryError
25
- from strawberry.extensions.runner import SchemaExtensionsRunner
26
- from strawberry.types import ExecutionResult
27
-
28
- from .exceptions import InvalidOperationTypeError
29
-
30
- if TYPE_CHECKING:
31
- from typing_extensions import NotRequired, Unpack
32
-
33
- from graphql import ExecutionContext as GraphQLExecutionContext
34
- from graphql import ExecutionResult as GraphQLExecutionResult
35
- from graphql import GraphQLSchema
36
- from graphql.language import DocumentNode
37
- from graphql.validation import ASTValidationRule
38
-
39
- from strawberry.extensions import SchemaExtension
40
- from strawberry.types import ExecutionContext
41
- from strawberry.types.graphql import OperationType
42
-
43
-
44
- # duplicated because of https://github.com/mkdocstrings/griffe-typingdoc/issues/7
45
- class ParseOptions(TypedDict):
46
- max_tokens: NotRequired[int]
47
-
48
-
49
- def parse_document(query: str, **kwargs: Unpack[ParseOptions]) -> DocumentNode:
50
- return parse(query, **kwargs)
51
-
52
-
53
- def validate_document(
54
- schema: GraphQLSchema,
55
- document: DocumentNode,
56
- validation_rules: Tuple[Type[ASTValidationRule], ...],
57
- ) -> List[GraphQLError]:
58
- return validate(
59
- schema,
60
- document,
61
- validation_rules,
62
- )
63
-
64
-
65
- def _run_validation(execution_context: ExecutionContext) -> None:
66
- # Check if there are any validation rules or if validation has
67
- # already been run by an extension
68
- if len(execution_context.validation_rules) > 0 and execution_context.errors is None:
69
- assert execution_context.graphql_document
70
- execution_context.errors = validate_document(
71
- execution_context.schema._schema,
72
- execution_context.graphql_document,
73
- execution_context.validation_rules,
74
- )
75
-
76
-
77
- async def execute(
78
- schema: GraphQLSchema,
79
- *,
80
- allowed_operation_types: Iterable[OperationType],
81
- extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
82
- execution_context: ExecutionContext,
83
- execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
84
- process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
85
- ) -> ExecutionResult:
86
- extensions_runner = SchemaExtensionsRunner(
87
- execution_context=execution_context,
88
- extensions=list(extensions),
89
- )
90
-
91
- async with extensions_runner.operation():
92
- # Note: In graphql-core the schema would be validated here but in
93
- # Strawberry we are validating it at initialisation time instead
94
- if not execution_context.query:
95
- raise MissingQueryError()
96
-
97
- async with extensions_runner.parsing():
98
- try:
99
- if not execution_context.graphql_document:
100
- execution_context.graphql_document = parse_document(
101
- execution_context.query, **execution_context.parse_options
102
- )
103
-
104
- except GraphQLError as error:
105
- execution_context.errors = [error]
106
- process_errors([error], execution_context)
107
- return ExecutionResult(
108
- data=None,
109
- errors=[error],
110
- extensions=await extensions_runner.get_extensions_results(),
111
- )
112
-
113
- except Exception as error: # pragma: no cover
114
- error = GraphQLError(str(error), original_error=error)
115
-
116
- execution_context.errors = [error]
117
- process_errors([error], execution_context)
118
-
119
- return ExecutionResult(
120
- data=None,
121
- errors=[error],
122
- extensions=await extensions_runner.get_extensions_results(),
123
- )
124
-
125
- if execution_context.operation_type not in allowed_operation_types:
126
- raise InvalidOperationTypeError(execution_context.operation_type)
127
-
128
- async with extensions_runner.validation():
129
- _run_validation(execution_context)
130
- if execution_context.errors:
131
- process_errors(execution_context.errors, execution_context)
132
- return ExecutionResult(data=None, errors=execution_context.errors)
133
-
134
- async with extensions_runner.executing():
135
- if not execution_context.result:
136
- result = original_execute(
137
- schema,
138
- execution_context.graphql_document,
139
- root_value=execution_context.root_value,
140
- middleware=extensions_runner.as_middleware_manager(),
141
- variable_values=execution_context.variables,
142
- operation_name=execution_context.operation_name,
143
- context_value=execution_context.context,
144
- execution_context_class=execution_context_class,
145
- )
146
-
147
- if isawaitable(result):
148
- result = await cast(Awaitable["GraphQLExecutionResult"], result)
149
-
150
- result = cast("GraphQLExecutionResult", result)
151
- execution_context.result = result
152
- # Also set errors on the execution_context so that it's easier
153
- # to access in extensions
154
- if result.errors:
155
- execution_context.errors = result.errors
156
-
157
- # Run the `Schema.process_errors` function here before
158
- # extensions have a chance to modify them (see the MaskErrors
159
- # extension). That way we can log the original errors but
160
- # only return a sanitised version to the client.
161
- process_errors(result.errors, execution_context)
162
-
163
- return ExecutionResult(
164
- data=execution_context.result.data,
165
- errors=execution_context.result.errors,
166
- extensions=await extensions_runner.get_extensions_results(),
167
- )
168
-
169
-
170
- def execute_sync(
171
- schema: GraphQLSchema,
172
- *,
173
- allowed_operation_types: Iterable[OperationType],
174
- extensions: Sequence[Union[Type[SchemaExtension], SchemaExtension]],
175
- execution_context: ExecutionContext,
176
- execution_context_class: Optional[Type[GraphQLExecutionContext]] = None,
177
- process_errors: Callable[[List[GraphQLError], Optional[ExecutionContext]], None],
178
- ) -> ExecutionResult:
179
- extensions_runner = SchemaExtensionsRunner(
180
- execution_context=execution_context,
181
- extensions=list(extensions),
182
- )
183
-
184
- with extensions_runner.operation():
185
- # Note: In graphql-core the schema would be validated here but in
186
- # Strawberry we are validating it at initialisation time instead
187
- if not execution_context.query:
188
- raise MissingQueryError()
189
-
190
- with extensions_runner.parsing():
191
- try:
192
- if not execution_context.graphql_document:
193
- execution_context.graphql_document = parse_document(
194
- execution_context.query, **execution_context.parse_options
195
- )
196
-
197
- except GraphQLError as error:
198
- execution_context.errors = [error]
199
- process_errors([error], execution_context)
200
- return ExecutionResult(
201
- data=None,
202
- errors=[error],
203
- extensions=extensions_runner.get_extensions_results_sync(),
204
- )
205
-
206
- except Exception as error: # pragma: no cover
207
- error = GraphQLError(str(error), original_error=error)
208
-
209
- execution_context.errors = [error]
210
- process_errors([error], execution_context)
211
- return ExecutionResult(
212
- data=None,
213
- errors=[error],
214
- extensions=extensions_runner.get_extensions_results_sync(),
215
- )
216
-
217
- if execution_context.operation_type not in allowed_operation_types:
218
- raise InvalidOperationTypeError(execution_context.operation_type)
219
-
220
- with extensions_runner.validation():
221
- _run_validation(execution_context)
222
- if execution_context.errors:
223
- process_errors(execution_context.errors, execution_context)
224
- return ExecutionResult(data=None, errors=execution_context.errors)
225
-
226
- with extensions_runner.executing():
227
- if not execution_context.result:
228
- result = original_execute(
229
- schema,
230
- execution_context.graphql_document,
231
- root_value=execution_context.root_value,
232
- middleware=extensions_runner.as_middleware_manager(),
233
- variable_values=execution_context.variables,
234
- operation_name=execution_context.operation_name,
235
- context_value=execution_context.context,
236
- execution_context_class=execution_context_class,
237
- )
238
-
239
- if isawaitable(result):
240
- result = cast(Awaitable["GraphQLExecutionResult"], result)
241
- ensure_future(result).cancel()
242
- raise RuntimeError(
243
- "GraphQL execution failed to complete synchronously."
244
- )
245
-
246
- result = cast("GraphQLExecutionResult", result)
247
- execution_context.result = result
248
- # Also set errors on the execution_context so that it's easier
249
- # to access in extensions
250
- if result.errors:
251
- execution_context.errors = result.errors
252
-
253
- # Run the `Schema.process_errors` function here before
254
- # extensions have a chance to modify them (see the MaskErrors
255
- # extension). That way we can log the original errors but
256
- # only return a sanitised version to the client.
257
- process_errors(result.errors, execution_context)
258
-
259
- return ExecutionResult(
260
- data=execution_context.result.data,
261
- errors=execution_context.result.errors,
262
- extensions=extensions_runner.get_extensions_results_sync(),
263
- )