graphql-core 3.2.9__tar.gz → 3.2.10__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 (347) hide show
  1. {graphql_core-3.2.9 → graphql_core-3.2.10}/.bumpversion.cfg +1 -1
  2. {graphql_core-3.2.9 → graphql_core-3.2.10}/.mypy.ini +1 -1
  3. {graphql_core-3.2.9 → graphql_core-3.2.10}/PKG-INFO +2 -2
  4. {graphql_core-3.2.9 → graphql_core-3.2.10}/README.md +1 -1
  5. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/conf.py +1 -0
  6. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/language.rst +11 -0
  7. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/utilities.rst +14 -0
  8. {graphql_core-3.2.9 → graphql_core-3.2.10}/poetry.lock +1 -1
  9. {graphql_core-3.2.9 → graphql_core-3.2.10}/pyproject.toml +1 -1
  10. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/__init__.py +38 -0
  11. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/execute.py +74 -19
  12. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/subscribe.py +4 -0
  13. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/graphql.py +1 -0
  14. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/__init__.py +22 -1
  15. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/ast.py +76 -3
  16. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/lexer.py +1 -0
  17. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/parser.py +112 -4
  18. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/predicates.py +20 -0
  19. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/printer.py +35 -4
  20. graphql_core-3.2.10/src/graphql/language/schema_coordinate_lexer.py +58 -0
  21. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/token_kind.py +1 -0
  22. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/__init__.py +24 -0
  23. graphql_core-3.2.10/src/graphql/utilities/resolve_schema_coordinate.py +295 -0
  24. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/values_of_correct_type.py +7 -23
  25. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/variables_in_allowed_position.py +24 -1
  26. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/validate.py +15 -2
  27. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/validation_context.py +5 -1
  28. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/version.py +2 -2
  29. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/PKG-INFO +2 -2
  30. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/SOURCES.txt +5 -0
  31. graphql_core-3.2.10/tests/benchmarks/test_print.py +9 -0
  32. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_executor.py +66 -0
  33. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_map_async_iterator.py +1 -1
  34. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_nonnull.py +137 -0
  35. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_subscribe.py +1 -1
  36. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_union_interface.py +68 -2
  37. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/fixtures/kitchen_sink.graphql +9 -1
  38. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_parser.py +362 -0
  39. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_predicates.py +10 -0
  40. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_printer.py +52 -2
  41. graphql_core-3.2.10/tests/language/test_schema_coordinate_lexer.py +41 -0
  42. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_schema_parser.py +2 -4
  43. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_visitor.py +6 -0
  44. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_ast_to_dict.py +4 -0
  45. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_coerce_input_value.py +28 -0
  46. graphql_core-3.2.10/tests/utilities/test_resolve_schema_coordinate.py +163 -0
  47. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_validation.py +19 -0
  48. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_values_of_correct_type.py +0 -18
  49. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_variables_in_allowed_position.py +41 -0
  50. {graphql_core-3.2.9 → graphql_core-3.2.10}/tox.ini +3 -3
  51. {graphql_core-3.2.9 → graphql_core-3.2.10}/.coveragerc +0 -0
  52. {graphql_core-3.2.9 → graphql_core-3.2.10}/.editorconfig +0 -0
  53. {graphql_core-3.2.9 → graphql_core-3.2.10}/.flake8 +0 -0
  54. {graphql_core-3.2.9 → graphql_core-3.2.10}/.readthedocs.yaml +0 -0
  55. {graphql_core-3.2.9 → graphql_core-3.2.10}/CODEOWNERS +0 -0
  56. {graphql_core-3.2.9 → graphql_core-3.2.10}/LICENSE +0 -0
  57. {graphql_core-3.2.9 → graphql_core-3.2.10}/MANIFEST.in +0 -0
  58. {graphql_core-3.2.9 → graphql_core-3.2.10}/SECURITY.md +0 -0
  59. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/Makefile +0 -0
  60. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/diffs.rst +0 -0
  61. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/index.rst +0 -0
  62. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/intro.rst +0 -0
  63. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/make.bat +0 -0
  64. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/error.rst +0 -0
  65. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/execution.rst +0 -0
  66. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/graphql.rst +0 -0
  67. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/pyutils.rst +0 -0
  68. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/type.rst +0 -0
  69. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/modules/validation.rst +0 -0
  70. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/requirements.txt +0 -0
  71. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/extension.rst +0 -0
  72. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/index.rst +0 -0
  73. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/introspection.rst +0 -0
  74. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/methods.rst +0 -0
  75. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/other.rst +0 -0
  76. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/parser.rst +0 -0
  77. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/queries.rst +0 -0
  78. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/resolvers.rst +0 -0
  79. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/schema.rst +0 -0
  80. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/sdl.rst +0 -0
  81. {graphql_core-3.2.9 → graphql_core-3.2.10}/docs/usage/validator.rst +0 -0
  82. {graphql_core-3.2.9 → graphql_core-3.2.10}/setup.cfg +0 -0
  83. {graphql_core-3.2.9 → graphql_core-3.2.10}/setup.py +0 -0
  84. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/error/__init__.py +0 -0
  85. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/error/graphql_error.py +0 -0
  86. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/error/located_error.py +0 -0
  87. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/error/syntax_error.py +0 -0
  88. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/__init__.py +0 -0
  89. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/collect_fields.py +0 -0
  90. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/map_async_iterator.py +0 -0
  91. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/middleware.py +0 -0
  92. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/execution/values.py +0 -0
  93. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/block_string.py +0 -0
  94. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/character_classes.py +0 -0
  95. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/directive_locations.py +0 -0
  96. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/location.py +0 -0
  97. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/print_location.py +0 -0
  98. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/print_string.py +0 -0
  99. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/source.py +0 -0
  100. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/language/visitor.py +0 -0
  101. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/py.typed +0 -0
  102. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/__init__.py +0 -0
  103. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/awaitable_or_value.py +0 -0
  104. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/cached_property.py +0 -0
  105. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/convert_case.py +0 -0
  106. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/description.py +0 -0
  107. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/did_you_mean.py +0 -0
  108. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/frozen_dict.py +0 -0
  109. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/frozen_error.py +0 -0
  110. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/frozen_list.py +0 -0
  111. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/group_by.py +0 -0
  112. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/identity_func.py +0 -0
  113. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/inspect.py +0 -0
  114. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/is_awaitable.py +0 -0
  115. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/is_iterable.py +0 -0
  116. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/merge_kwargs.py +0 -0
  117. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/natural_compare.py +0 -0
  118. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/path.py +0 -0
  119. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/print_path_list.py +0 -0
  120. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/simple_pub_sub.py +0 -0
  121. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/suggestion_list.py +0 -0
  122. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/pyutils/undefined.py +0 -0
  123. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/subscription/__init__.py +0 -0
  124. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/__init__.py +0 -0
  125. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/assert_name.py +0 -0
  126. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/definition.py +0 -0
  127. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/directives.py +0 -0
  128. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/introspection.py +0 -0
  129. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/scalars.py +0 -0
  130. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/schema.py +0 -0
  131. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/type/validate.py +0 -0
  132. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/assert_valid_name.py +0 -0
  133. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/ast_from_value.py +0 -0
  134. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/ast_to_dict.py +0 -0
  135. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/build_ast_schema.py +0 -0
  136. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/build_client_schema.py +0 -0
  137. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/coerce_input_value.py +0 -0
  138. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/concat_ast.py +0 -0
  139. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/extend_schema.py +0 -0
  140. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/find_breaking_changes.py +0 -0
  141. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/get_introspection_query.py +0 -0
  142. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/get_operation_ast.py +0 -0
  143. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/get_operation_root_type.py +0 -0
  144. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/introspection_from_schema.py +0 -0
  145. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/lexicographic_sort_schema.py +0 -0
  146. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/print_schema.py +0 -0
  147. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/separate_operations.py +0 -0
  148. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/sort_value_node.py +0 -0
  149. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/strip_ignored_characters.py +0 -0
  150. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/type_comparators.py +0 -0
  151. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/type_from_ast.py +0 -0
  152. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/type_info.py +0 -0
  153. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/value_from_ast.py +0 -0
  154. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/utilities/value_from_ast_untyped.py +0 -0
  155. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/__init__.py +0 -0
  156. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/__init__.py +0 -0
  157. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/custom/__init__.py +0 -0
  158. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/custom/no_deprecated.py +0 -0
  159. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/custom/no_schema_introspection.py +0 -0
  160. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/executable_definitions.py +0 -0
  161. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/fields_on_correct_type.py +0 -0
  162. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/fragments_on_composite_types.py +0 -0
  163. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/known_argument_names.py +0 -0
  164. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/known_directives.py +0 -0
  165. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/known_fragment_names.py +0 -0
  166. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/known_type_names.py +0 -0
  167. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/lone_anonymous_operation.py +0 -0
  168. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/lone_schema_definition.py +0 -0
  169. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/max_introspection_depth_rule.py +0 -0
  170. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/no_fragment_cycles.py +0 -0
  171. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/no_undefined_variables.py +0 -0
  172. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/no_unused_fragments.py +0 -0
  173. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/no_unused_variables.py +0 -0
  174. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/overlapping_fields_can_be_merged.py +0 -0
  175. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/possible_fragment_spreads.py +0 -0
  176. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/possible_type_extensions.py +0 -0
  177. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/provided_required_arguments.py +0 -0
  178. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/scalar_leafs.py +0 -0
  179. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/single_field_subscriptions.py +0 -0
  180. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_argument_definition_names.py +0 -0
  181. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_argument_names.py +0 -0
  182. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_directive_names.py +0 -0
  183. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_directives_per_location.py +0 -0
  184. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_enum_value_names.py +0 -0
  185. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_field_definition_names.py +0 -0
  186. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_fragment_names.py +0 -0
  187. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_input_field_names.py +0 -0
  188. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_operation_names.py +0 -0
  189. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_operation_types.py +0 -0
  190. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_type_names.py +0 -0
  191. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/unique_variable_names.py +0 -0
  192. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/rules/variables_are_input_types.py +0 -0
  193. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql/validation/specified_rules.py +0 -0
  194. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/dependency_links.txt +0 -0
  195. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/not-zip-safe +0 -0
  196. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/requires.txt +0 -0
  197. {graphql_core-3.2.9 → graphql_core-3.2.10}/src/graphql_core.egg-info/top_level.txt +0 -0
  198. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/__init__.py +0 -0
  199. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/__init__.py +0 -0
  200. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_build_ast_schema.py +0 -0
  201. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_build_client_schema.py +0 -0
  202. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_execution_async.py +0 -0
  203. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_execution_sync.py +0 -0
  204. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_introspection_from_schema.py +0 -0
  205. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_parser.py +0 -0
  206. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_repeated_fields.py +0 -0
  207. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_validate_gql.py +0 -0
  208. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_validate_invalid_gql.py +0 -0
  209. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_validate_sdl.py +0 -0
  210. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/benchmarks/test_visit.py +0 -0
  211. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/conftest.py +0 -0
  212. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/error/__init__.py +0 -0
  213. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/error/test_graphql_error.py +0 -0
  214. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/error/test_located_error.py +0 -0
  215. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/error/test_print_location.py +0 -0
  216. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/__init__.py +0 -0
  217. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_abstract.py +0 -0
  218. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_customize.py +0 -0
  219. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_directives.py +0 -0
  220. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_execution_result.py +0 -0
  221. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_lists.py +0 -0
  222. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_middleware.py +0 -0
  223. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_mutations.py +0 -0
  224. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_one_of.py +0 -0
  225. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_parallel.py +0 -0
  226. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_resolve.py +0 -0
  227. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_schema.py +0 -0
  228. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_sync.py +0 -0
  229. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/execution/test_variables.py +0 -0
  230. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/fixtures/__init__.py +0 -0
  231. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/fixtures/github_schema.graphql +0 -0
  232. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/fixtures/github_schema.json +0 -0
  233. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/fixtures/schema_kitchen_sink.graphql +0 -0
  234. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/__init__.py +0 -0
  235. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_ast.py +0 -0
  236. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_block_string.py +0 -0
  237. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_block_string_fuzz.py +0 -0
  238. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_character_classes.py +0 -0
  239. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_lexer.py +0 -0
  240. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_location.py +0 -0
  241. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_print_string.py +0 -0
  242. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_schema_printer.py +0 -0
  243. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/language/test_source.py +0 -0
  244. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/__init__.py +0 -0
  245. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_cached_property.py +0 -0
  246. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_convert_case.py +0 -0
  247. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_description.py +0 -0
  248. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_did_you_mean.py +0 -0
  249. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_frozen_dict.py +0 -0
  250. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_frozen_error.py +0 -0
  251. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_frozen_list.py +0 -0
  252. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_group_by.py +0 -0
  253. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_identity_func.py +0 -0
  254. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_inspect.py +0 -0
  255. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_is_awaitable.py +0 -0
  256. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_is_iterable.py +0 -0
  257. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_merge_kwargs.py +0 -0
  258. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_natural_compare.py +0 -0
  259. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_path.py +0 -0
  260. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_print_path_list.py +0 -0
  261. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_simple_pub_sub.py +0 -0
  262. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_suggestion_list.py +0 -0
  263. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/pyutils/test_undefined.py +0 -0
  264. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/star_wars_data.py +0 -0
  265. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/star_wars_schema.py +0 -0
  266. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_docs.py +0 -0
  267. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_star_wars_introspection.py +0 -0
  268. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_star_wars_query.py +0 -0
  269. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_star_wars_validation.py +0 -0
  270. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_user_registry.py +0 -0
  271. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/test_version.py +0 -0
  272. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/__init__.py +0 -0
  273. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_assert_name.py +0 -0
  274. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_custom_scalars.py +0 -0
  275. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_definition.py +0 -0
  276. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_directives.py +0 -0
  277. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_enum.py +0 -0
  278. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_extensions.py +0 -0
  279. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_introspection.py +0 -0
  280. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_predicate.py +0 -0
  281. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_scalars.py +0 -0
  282. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_schema.py +0 -0
  283. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/type/test_validation.py +0 -0
  284. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/__init__.py +0 -0
  285. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_ast_from_value.py +0 -0
  286. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_build_ast_schema.py +0 -0
  287. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_build_client_schema.py +0 -0
  288. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_concat_ast.py +0 -0
  289. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_extend_schema.py +0 -0
  290. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_find_breaking_changes.py +0 -0
  291. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_get_introspection_query.py +0 -0
  292. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_get_operation_ast.py +0 -0
  293. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_get_operation_root_type.py +0 -0
  294. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_introspection_from_schema.py +0 -0
  295. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_lexicographic_sort_schema.py +0 -0
  296. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_print_schema.py +0 -0
  297. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_separate_operations.py +0 -0
  298. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_sort_value_node.py +0 -0
  299. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_strip_ignored_characters.py +0 -0
  300. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_strip_ignored_characters_fuzz.py +0 -0
  301. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_type_comparators.py +0 -0
  302. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_type_from_ast.py +0 -0
  303. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_type_info.py +0 -0
  304. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_value_from_ast.py +0 -0
  305. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utilities/test_value_from_ast_untyped.py +0 -0
  306. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utils/__init__.py +0 -0
  307. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utils/dedent.py +0 -0
  308. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utils/gen_fuzz_strings.py +0 -0
  309. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utils/test_dedent.py +0 -0
  310. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/utils/test_gen_fuzz_strings.py +0 -0
  311. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/__init__.py +0 -0
  312. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/harness.py +0 -0
  313. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_executable_definitions.py +0 -0
  314. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_fields_on_correct_type.py +0 -0
  315. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_fragments_on_composite_types.py +0 -0
  316. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_known_argument_names.py +0 -0
  317. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_known_directives.py +0 -0
  318. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_known_fragment_names.py +0 -0
  319. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_known_type_names.py +0 -0
  320. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_lone_anonymous_operation.py +0 -0
  321. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_lone_schema_definition.py +0 -0
  322. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_max_introspection_depth_rule.py +0 -0
  323. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_deprecated.py +0 -0
  324. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_fragment_cycles.py +0 -0
  325. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_schema_introspection.py +0 -0
  326. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_undefined_variables.py +0 -0
  327. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_unused_fragments.py +0 -0
  328. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_no_unused_variables.py +0 -0
  329. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_overlapping_fields_can_be_merged.py +0 -0
  330. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_possible_fragment_spreads.py +0 -0
  331. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_possible_type_extensions.py +0 -0
  332. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_provided_required_arguments.py +0 -0
  333. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_scalar_leafs.py +0 -0
  334. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_single_field_subscriptions.py +0 -0
  335. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_argument_definition_names.py +0 -0
  336. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_argument_names.py +0 -0
  337. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_directive_names.py +0 -0
  338. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_directives_per_location.py +0 -0
  339. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_enum_value_names.py +0 -0
  340. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_field_definition_names.py +0 -0
  341. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_fragment_names.py +0 -0
  342. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_input_field_names.py +0 -0
  343. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_operation_names.py +0 -0
  344. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_operation_types.py +0 -0
  345. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_type_names.py +0 -0
  346. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_unique_variable_names.py +0 -0
  347. {graphql_core-3.2.9 → graphql_core-3.2.10}/tests/validation/test_variables_are_input_types.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.2.9
2
+ current_version = 3.2.10
3
3
  commit = False
4
4
  tag = False
5
5
 
@@ -1,5 +1,5 @@
1
1
  [mypy]
2
- python_version = 3.9
2
+ python_version = 3.10
3
3
  check_untyped_defs = True
4
4
  no_implicit_optional = True
5
5
  strict_optional = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphql-core
3
- Version: 3.2.9
3
+ Version: 3.2.10
4
4
  Summary: GraphQL implementation for Python, a port of GraphQL.js, the JavaScript reference implementation for GraphQL.
5
5
  Home-page: https://github.com/graphql-python/graphql-core
6
6
  Author: Christoph Zwerschke
@@ -50,7 +50,7 @@ a query language for APIs created by Facebook.
50
50
  ![Lint Status](https://github.com/graphql-python/graphql-core/actions/workflows/lint.yml/badge.svg)
51
51
  [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
52
52
 
53
- The current version 3.2.9 of GraphQL-core is up-to-date with GraphQL.js version 16.10.0.
53
+ The current version 3.2.10 of GraphQL-core is up-to-date with GraphQL.js version 16.13.0.
54
54
 
55
55
  An extensive test suite with over 2500 unit tests and 100% coverage comprises a
56
56
  replication of the complete test suite of GraphQL.js, making sure this port is
@@ -10,7 +10,7 @@ a query language for APIs created by Facebook.
10
10
  ![Lint Status](https://github.com/graphql-python/graphql-core/actions/workflows/lint.yml/badge.svg)
11
11
  [![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
12
12
 
13
- The current version 3.2.9 of GraphQL-core is up-to-date with GraphQL.js version 16.10.0.
13
+ The current version 3.2.10 of GraphQL-core is up-to-date with GraphQL.js version 16.13.0.
14
14
 
15
15
  An extensive test suite with over 2500 unit tests and 100% coverage comprises a
16
16
  replication of the complete test suite of GraphQL.js, making sure this port is
@@ -151,6 +151,7 @@ GraphQLErrorExtensions
151
151
  GraphQLFormattedErrorExtensions
152
152
  GraphQLOutputType
153
153
  asyncio.events.AbstractEventLoop
154
+ graphql.execution.execute.CollectedErrors
154
155
  graphql.execution.map_async_iterator.MapAsyncIterator
155
156
  graphql.language.lexer.EscapeSequence
156
157
  graphql.language.visitor.EnterLeaveVisitor
@@ -75,6 +75,15 @@ Each kind of AST node has its own class:
75
75
  .. autoclass:: VariableDefinitionNode
76
76
  .. autoclass:: VariableNode
77
77
 
78
+ Schema coordinates are represented using the following node classes:
79
+
80
+ .. autoclass:: SchemaCoordinateNode
81
+ .. autoclass:: TypeCoordinateNode
82
+ .. autoclass:: MemberCoordinateNode
83
+ .. autoclass:: ArgumentCoordinateNode
84
+ .. autoclass:: DirectiveCoordinateNode
85
+ .. autoclass:: DirectiveArgumentCoordinateNode
86
+
78
87
  Directive locations are specified using the following enumeration:
79
88
 
80
89
  .. autoclass:: DirectiveLocation
@@ -91,6 +100,7 @@ You can also check the type of nodes with the following predicates:
91
100
  .. autofunction:: is_type_definition_node
92
101
  .. autofunction:: is_type_system_extension_node
93
102
  .. autofunction:: is_type_extension_node
103
+ .. autofunction:: is_schema_coordinate_node
94
104
 
95
105
  Lexer
96
106
  -----
@@ -116,6 +126,7 @@ Parser
116
126
  .. autofunction:: parse_type
117
127
  .. autofunction:: parse_value
118
128
  .. autofunction:: parse_const_value
129
+ .. autofunction:: parse_schema_coordinate
119
130
 
120
131
  Printer
121
132
  -------
@@ -112,3 +112,17 @@ Compare two GraphQLSchemas and detect breaking changes:
112
112
  .. autoclass:: BreakingChangeType
113
113
  .. autoclass:: DangerousChange
114
114
  .. autoclass:: DangerousChangeType
115
+
116
+ Resolve a schema coordinate to the schema element it refers to:
117
+
118
+ .. autofunction:: resolve_schema_coordinate
119
+ .. autofunction:: resolve_ast_schema_coordinate
120
+
121
+ .. autoclass:: ResolvedNamedType
122
+ .. autoclass:: ResolvedField
123
+ .. autoclass:: ResolvedInputField
124
+ .. autoclass:: ResolvedEnumValue
125
+ .. autoclass:: ResolvedFieldArgument
126
+ .. autoclass:: ResolvedDirective
127
+ .. autoclass:: ResolvedDirectiveArgument
128
+ .. autoclass:: ResolvedSchemaElement
@@ -1,4 +1,4 @@
1
- # This file is automatically @generated by Poetry 2.3.2 and should not be changed by hand.
1
+ # This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand.
2
2
 
3
3
  [[package]]
4
4
  name = "typing-extensions"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "graphql-core"
3
- version = "3.2.9"
3
+ version = "3.2.10"
4
4
  description = """
5
5
  GraphQL-core is a Python port of GraphQL.js,\
6
6
  the JavaScript reference implementation for GraphQL."""
@@ -68,6 +68,7 @@ from .language import (
68
68
  parse_value,
69
69
  parse_const_value,
70
70
  parse_type,
71
+ parse_schema_coordinate,
71
72
  # Print
72
73
  print_ast,
73
74
  # Visit
@@ -92,6 +93,7 @@ from .language import (
92
93
  is_type_definition_node,
93
94
  is_type_system_extension_node,
94
95
  is_type_extension_node,
96
+ is_schema_coordinate_node,
95
97
  # Types
96
98
  SourceLocation,
97
99
  Location,
@@ -158,6 +160,13 @@ from .language import (
158
160
  UnionTypeExtensionNode,
159
161
  EnumTypeExtensionNode,
160
162
  InputObjectTypeExtensionNode,
163
+ # Schema Coordinates
164
+ SchemaCoordinateNode,
165
+ TypeCoordinateNode,
166
+ MemberCoordinateNode,
167
+ ArgumentCoordinateNode,
168
+ DirectiveCoordinateNode,
169
+ DirectiveArgumentCoordinateNode,
161
170
  )
162
171
 
163
172
  # Utilities for operating on GraphQL type schema and parsed sources.
@@ -226,6 +235,17 @@ from .utilities import (
226
235
  DangerousChangeType,
227
236
  find_breaking_changes,
228
237
  find_dangerous_changes,
238
+ # Resolve a schema coordinate to a schema element.
239
+ resolve_schema_coordinate,
240
+ resolve_ast_schema_coordinate,
241
+ ResolvedNamedType,
242
+ ResolvedField,
243
+ ResolvedInputField,
244
+ ResolvedEnumValue,
245
+ ResolvedFieldArgument,
246
+ ResolvedDirective,
247
+ ResolvedDirectiveArgument,
248
+ ResolvedSchemaElement,
229
249
  )
230
250
 
231
251
  # Create and operate on GraphQL type definitions and schema.
@@ -602,6 +622,7 @@ __all__ = [
602
622
  "parse_value",
603
623
  "parse_const_value",
604
624
  "parse_type",
625
+ "parse_schema_coordinate",
605
626
  "print_ast",
606
627
  "visit",
607
628
  "ParallelVisitor",
@@ -624,6 +645,7 @@ __all__ = [
624
645
  "is_type_definition_node",
625
646
  "is_type_system_extension_node",
626
647
  "is_type_extension_node",
648
+ "is_schema_coordinate_node",
627
649
  "SourceLocation",
628
650
  "Location",
629
651
  "Token",
@@ -687,6 +709,12 @@ __all__ = [
687
709
  "UnionTypeExtensionNode",
688
710
  "EnumTypeExtensionNode",
689
711
  "InputObjectTypeExtensionNode",
712
+ "SchemaCoordinateNode",
713
+ "TypeCoordinateNode",
714
+ "MemberCoordinateNode",
715
+ "ArgumentCoordinateNode",
716
+ "DirectiveCoordinateNode",
717
+ "DirectiveArgumentCoordinateNode",
690
718
  "execute",
691
719
  "execute_sync",
692
720
  "default_field_resolver",
@@ -786,6 +814,16 @@ __all__ = [
786
814
  "BreakingChangeType",
787
815
  "DangerousChange",
788
816
  "DangerousChangeType",
817
+ "resolve_schema_coordinate",
818
+ "resolve_ast_schema_coordinate",
819
+ "ResolvedNamedType",
820
+ "ResolvedField",
821
+ "ResolvedInputField",
822
+ "ResolvedEnumValue",
823
+ "ResolvedFieldArgument",
824
+ "ResolvedDirective",
825
+ "ResolvedDirectiveArgument",
826
+ "ResolvedSchemaElement",
789
827
  "Undefined",
790
828
  "UndefinedType",
791
829
  ]
@@ -1,5 +1,6 @@
1
1
  from asyncio import ensure_future, gather
2
2
  from collections.abc import Mapping
3
+ from contextlib import suppress
3
4
  from inspect import isawaitable
4
5
  from typing import (
5
6
  Any,
@@ -10,6 +11,7 @@ from typing import (
10
11
  Iterable,
11
12
  List,
12
13
  Optional,
14
+ Set,
13
15
  Tuple,
14
16
  Type,
15
17
  Union,
@@ -173,6 +175,42 @@ class ExecutionResult:
173
175
  Middleware = Optional[Union[Tuple, List, MiddlewareManager]]
174
176
 
175
177
 
178
+ class CollectedErrors:
179
+ """A list of errors collected during execution, ignoring nulled positions.
180
+
181
+ For internal use only.
182
+ """
183
+
184
+ _error_positions: Set[Optional[Path]]
185
+ _errors: List[GraphQLError]
186
+
187
+ def __init__(self) -> None:
188
+ self._error_positions = set()
189
+ self._errors = []
190
+
191
+ @property
192
+ def errors(self) -> List[GraphQLError]:
193
+ return self._errors
194
+
195
+ def add(self, error: GraphQLError, path: Optional[Path]) -> None:
196
+ # Do not modify errors list if the execution position for this error or
197
+ # any of its ancestors has already been nulled via error propagation.
198
+ # This check should be unnecessary for implementations able to implement
199
+ # actual cancellation.
200
+ if self._has_nulled_position(path):
201
+ return
202
+ self._error_positions.add(path)
203
+ self._errors.append(error)
204
+
205
+ def _has_nulled_position(self, start_path: Optional[Path]) -> bool:
206
+ path = start_path
207
+ while path is not None:
208
+ if path in self._error_positions:
209
+ return True
210
+ path = path.prev
211
+ return None in self._error_positions
212
+
213
+
176
214
  class ExecutionContext:
177
215
  """Data that must be available at all points during query execution.
178
216
 
@@ -189,7 +227,7 @@ class ExecutionContext:
189
227
  field_resolver: GraphQLFieldResolver
190
228
  type_resolver: GraphQLTypeResolver
191
229
  subscribe_field_resolver: GraphQLFieldResolver
192
- errors: List[GraphQLError]
230
+ collected_errors: CollectedErrors
193
231
  middleware_manager: Optional[MiddlewareManager]
194
232
 
195
233
  is_awaitable = staticmethod(default_is_awaitable)
@@ -205,7 +243,7 @@ class ExecutionContext:
205
243
  field_resolver: GraphQLFieldResolver,
206
244
  type_resolver: GraphQLTypeResolver,
207
245
  subscribe_field_resolver: GraphQLFieldResolver,
208
- errors: List[GraphQLError],
246
+ collected_errors: CollectedErrors,
209
247
  middleware_manager: Optional[MiddlewareManager],
210
248
  is_awaitable: Optional[Callable[[Any], bool]],
211
249
  ) -> None:
@@ -218,7 +256,7 @@ class ExecutionContext:
218
256
  self.field_resolver = field_resolver
219
257
  self.type_resolver = type_resolver
220
258
  self.subscribe_field_resolver = subscribe_field_resolver
221
- self.errors = errors
259
+ self.collected_errors = collected_errors
222
260
  self.middleware_manager = middleware_manager
223
261
  if is_awaitable:
224
262
  self.is_awaitable = is_awaitable # type: ignore
@@ -236,6 +274,7 @@ class ExecutionContext:
236
274
  field_resolver: Optional[GraphQLFieldResolver] = None,
237
275
  type_resolver: Optional[GraphQLTypeResolver] = None,
238
276
  subscribe_field_resolver: Optional[GraphQLFieldResolver] = None,
277
+ max_coercion_errors: int = 50,
239
278
  middleware: Optional[Middleware] = None,
240
279
  is_awaitable: Optional[Callable[[Any], bool]] = None,
241
280
  ) -> Union[List[GraphQLError], "ExecutionContext"]:
@@ -288,7 +327,7 @@ class ExecutionContext:
288
327
  schema,
289
328
  operation.variable_definitions or (),
290
329
  raw_variable_values or {},
291
- max_errors=50,
330
+ max_errors=max_coercion_errors,
292
331
  )
293
332
 
294
333
  if isinstance(coerced_variable_values, list):
@@ -304,7 +343,7 @@ class ExecutionContext:
304
343
  field_resolver or default_field_resolver,
305
344
  type_resolver or default_type_resolver,
306
345
  subscribe_field_resolver or default_field_resolver,
307
- [],
346
+ CollectedErrors(),
308
347
  middleware_manager,
309
348
  is_awaitable,
310
349
  )
@@ -534,7 +573,7 @@ class ExecutionContext:
534
573
  return completed
535
574
  except Exception as raw_error:
536
575
  error = located_error(raw_error, field_nodes, path.as_list())
537
- self.handle_field_error(error, return_type)
576
+ self.handle_field_error(error, return_type, path)
538
577
  return None
539
578
 
540
579
  return await_result()
@@ -549,7 +588,7 @@ class ExecutionContext:
549
588
  return await completed
550
589
  except Exception as raw_error:
551
590
  error = located_error(raw_error, field_nodes, path.as_list())
552
- self.handle_field_error(error, return_type)
591
+ self.handle_field_error(error, return_type, path)
553
592
  return None
554
593
 
555
594
  return await_completed()
@@ -557,13 +596,14 @@ class ExecutionContext:
557
596
  return completed
558
597
  except Exception as raw_error:
559
598
  error = located_error(raw_error, field_nodes, path.as_list())
560
- self.handle_field_error(error, return_type)
599
+ self.handle_field_error(error, return_type, path)
561
600
  return None
562
601
 
563
602
  def handle_field_error(
564
603
  self,
565
604
  error: GraphQLError,
566
605
  return_type: GraphQLOutputType,
606
+ path: Path,
567
607
  ) -> None:
568
608
  # If the field type is non-nullable, then it is resolved without any protection
569
609
  # from errors, however it still properly locates the error.
@@ -571,7 +611,7 @@ class ExecutionContext:
571
611
  raise error
572
612
  # Otherwise, error protection is applied, logging the error and resolving a
573
613
  # null value for this field if one is encountered.
574
- self.errors.append(error)
614
+ self.collected_errors.add(error, path)
575
615
  return None
576
616
 
577
617
  def complete_value(
@@ -719,7 +759,7 @@ class ExecutionContext:
719
759
  error = located_error(
720
760
  raw_error, field_nodes, item_path.as_list()
721
761
  )
722
- self.handle_field_error(error, item_type)
762
+ self.handle_field_error(error, item_type, item_path)
723
763
  return None
724
764
 
725
765
  completed_item = await_completed(item, item_path)
@@ -737,13 +777,13 @@ class ExecutionContext:
737
777
  error = located_error(
738
778
  raw_error, field_nodes, item_path.as_list()
739
779
  )
740
- self.handle_field_error(error, item_type)
780
+ self.handle_field_error(error, item_type, item_path)
741
781
  return None
742
782
 
743
783
  completed_item = await_completed(completed_item, item_path)
744
784
  except Exception as raw_error:
745
785
  error = located_error(raw_error, field_nodes, item_path.as_list())
746
- self.handle_field_error(error, item_type)
786
+ self.handle_field_error(error, item_type, item_path)
747
787
  completed_item = None
748
788
 
749
789
  if is_awaitable(completed_item):
@@ -974,6 +1014,7 @@ def execute(
974
1014
  field_resolver: Optional[GraphQLFieldResolver] = None,
975
1015
  type_resolver: Optional[GraphQLTypeResolver] = None,
976
1016
  subscribe_field_resolver: Optional[GraphQLFieldResolver] = None,
1017
+ max_coercion_errors: int = 50,
977
1018
  middleware: Optional[Middleware] = None,
978
1019
  execution_context_class: Optional[Type["ExecutionContext"]] = None,
979
1020
  is_awaitable: Optional[Callable[[Any], bool]] = None,
@@ -1006,6 +1047,7 @@ def execute(
1006
1047
  field_resolver,
1007
1048
  type_resolver,
1008
1049
  subscribe_field_resolver,
1050
+ max_coercion_errors,
1009
1051
  middleware,
1010
1052
  is_awaitable,
1011
1053
  )
@@ -1025,7 +1067,7 @@ def execute(
1025
1067
  # Errors from sub-fields of a NonNull type may propagate to the top level,
1026
1068
  # at which point we still log the error and null the parent field, which
1027
1069
  # in this case is the entire response.
1028
- errors = exe_context.errors
1070
+ collected_errors = exe_context.collected_errors
1029
1071
  build_response = exe_context.build_response
1030
1072
  try:
1031
1073
  operation = exe_context.operation
@@ -1035,17 +1077,18 @@ def execute(
1035
1077
  # noinspection PyShadowingNames
1036
1078
  async def await_result() -> Any:
1037
1079
  try:
1038
- return build_response(await result, errors) # type: ignore
1080
+ data = await result # type: ignore
1081
+ return build_response(data, collected_errors.errors)
1039
1082
  except GraphQLError as error:
1040
- errors.append(error)
1041
- return build_response(None, errors)
1083
+ collected_errors.add(error, None)
1084
+ return build_response(None, collected_errors.errors)
1042
1085
 
1043
1086
  return await_result()
1044
1087
  except GraphQLError as error:
1045
- errors.append(error)
1046
- return build_response(None, errors)
1088
+ collected_errors.add(error, None)
1089
+ return build_response(None, collected_errors.errors)
1047
1090
  else:
1048
- return build_response(result, errors) # type: ignore
1091
+ return build_response(result, collected_errors.errors) # type: ignore
1049
1092
 
1050
1093
 
1051
1094
  def assume_not_awaitable(_value: Any) -> bool:
@@ -1062,6 +1105,7 @@ def execute_sync(
1062
1105
  operation_name: Optional[str] = None,
1063
1106
  field_resolver: Optional[GraphQLFieldResolver] = None,
1064
1107
  type_resolver: Optional[GraphQLTypeResolver] = None,
1108
+ max_coercion_errors: int = 50,
1065
1109
  middleware: Optional[Middleware] = None,
1066
1110
  execution_context_class: Optional[Type["ExecutionContext"]] = None,
1067
1111
  check_sync: bool = False,
@@ -1091,6 +1135,7 @@ def execute_sync(
1091
1135
  field_resolver,
1092
1136
  type_resolver,
1093
1137
  None,
1138
+ max_coercion_errors,
1094
1139
  middleware,
1095
1140
  execution_context_class,
1096
1141
  is_awaitable,
@@ -1214,6 +1259,16 @@ def default_type_resolver(
1214
1259
  append_awaitable_results(cast(Awaitable, is_type_of_result))
1215
1260
  append_awaitable_types(type_)
1216
1261
  elif is_type_of_result:
1262
+ if awaitable_is_type_of_results:
1263
+ # noinspection PyShadowingNames
1264
+ async def await_is_type_of_and_return_type(
1265
+ resolved_type_name: str = type_.name,
1266
+ ) -> str:
1267
+ with suppress(Exception):
1268
+ await gather(*awaitable_is_type_of_results)
1269
+ return resolved_type_name
1270
+
1271
+ return await_is_type_of_and_return_type()
1217
1272
  return type_.name
1218
1273
 
1219
1274
  if awaitable_is_type_of_results:
@@ -35,6 +35,7 @@ async def subscribe(
35
35
  operation_name: Optional[str] = None,
36
36
  field_resolver: Optional[GraphQLFieldResolver] = None,
37
37
  subscribe_field_resolver: Optional[GraphQLFieldResolver] = None,
38
+ max_coercion_errors: int = 50,
38
39
  ) -> Union[AsyncIterator[ExecutionResult], ExecutionResult]:
39
40
  """Create a GraphQL subscription.
40
41
 
@@ -63,6 +64,7 @@ async def subscribe(
63
64
  variable_values,
64
65
  operation_name,
65
66
  subscribe_field_resolver,
67
+ max_coercion_errors,
66
68
  )
67
69
  if isinstance(result_or_stream, ExecutionResult):
68
70
  return result_or_stream
@@ -100,6 +102,7 @@ async def create_source_event_stream(
100
102
  variable_values: Optional[Dict[str, Any]] = None,
101
103
  operation_name: Optional[str] = None,
102
104
  subscribe_field_resolver: Optional[GraphQLFieldResolver] = None,
105
+ max_coercion_errors: int = 50,
103
106
  ) -> Union[AsyncIterable[Any], ExecutionResult]:
104
107
  """Create source event stream
105
108
 
@@ -138,6 +141,7 @@ async def create_source_event_stream(
138
141
  variable_values,
139
142
  operation_name,
140
143
  subscribe_field_resolver=subscribe_field_resolver,
144
+ max_coercion_errors=max_coercion_errors,
141
145
  )
142
146
 
143
147
  # Return early errors if execution context failed.
@@ -192,6 +192,7 @@ def graphql_impl(
192
192
  field_resolver,
193
193
  type_resolver,
194
194
  None,
195
+ 50,
195
196
  middleware,
196
197
  execution_context_class,
197
198
  is_awaitable,
@@ -14,7 +14,13 @@ from .token_kind import TokenKind
14
14
 
15
15
  from .lexer import Lexer
16
16
 
17
- from .parser import parse, parse_type, parse_value, parse_const_value
17
+ from .parser import (
18
+ parse,
19
+ parse_type,
20
+ parse_value,
21
+ parse_const_value,
22
+ parse_schema_coordinate,
23
+ )
18
24
 
19
25
  from .printer import print_ast
20
26
 
@@ -94,6 +100,12 @@ from .ast import (
94
100
  UnionTypeExtensionNode,
95
101
  EnumTypeExtensionNode,
96
102
  InputObjectTypeExtensionNode,
103
+ SchemaCoordinateNode,
104
+ TypeCoordinateNode,
105
+ MemberCoordinateNode,
106
+ ArgumentCoordinateNode,
107
+ DirectiveCoordinateNode,
108
+ DirectiveArgumentCoordinateNode,
97
109
  )
98
110
  from .predicates import (
99
111
  is_definition_node,
@@ -106,6 +118,7 @@ from .predicates import (
106
118
  is_type_definition_node,
107
119
  is_type_system_extension_node,
108
120
  is_type_extension_node,
121
+ is_schema_coordinate_node,
109
122
  )
110
123
  from .directive_locations import DirectiveLocation
111
124
 
@@ -121,6 +134,7 @@ __all__ = [
121
134
  "parse_value",
122
135
  "parse_const_value",
123
136
  "parse_type",
137
+ "parse_schema_coordinate",
124
138
  "print_ast",
125
139
  "Source",
126
140
  "visit",
@@ -195,6 +209,12 @@ __all__ = [
195
209
  "UnionTypeExtensionNode",
196
210
  "EnumTypeExtensionNode",
197
211
  "InputObjectTypeExtensionNode",
212
+ "SchemaCoordinateNode",
213
+ "TypeCoordinateNode",
214
+ "MemberCoordinateNode",
215
+ "ArgumentCoordinateNode",
216
+ "DirectiveCoordinateNode",
217
+ "DirectiveArgumentCoordinateNode",
198
218
  "is_definition_node",
199
219
  "is_executable_definition_node",
200
220
  "is_selection_node",
@@ -205,4 +225,5 @@ __all__ = [
205
225
  "is_type_definition_node",
206
226
  "is_type_system_extension_node",
207
227
  "is_type_extension_node",
228
+ "is_schema_coordinate_node",
208
229
  ]