graphql-core 3.2.8__tar.gz → 3.2.9__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 (343) hide show
  1. {graphql_core-3.2.8 → graphql_core-3.2.9}/.bumpversion.cfg +1 -1
  2. {graphql_core-3.2.8 → graphql_core-3.2.9}/.readthedocs.yaml +2 -2
  3. {graphql_core-3.2.8 → graphql_core-3.2.9}/PKG-INFO +2 -2
  4. {graphql_core-3.2.8 → graphql_core-3.2.9}/README.md +1 -1
  5. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/conf.py +2 -1
  6. graphql_core-3.2.9/docs/requirements.txt +2 -0
  7. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/introspection.rst +1 -1
  8. {graphql_core-3.2.8 → graphql_core-3.2.9}/pyproject.toml +1 -1
  9. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/__init__.py +2 -0
  10. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/error/__init__.py +7 -1
  11. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/error/graphql_error.py +15 -2
  12. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/ast.py +5 -0
  13. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/parser.py +12 -4
  14. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/validate.py +2 -1
  15. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/get_introspection_query.py +3 -3
  16. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/lexicographic_sort_schema.py +25 -21
  17. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/overlapping_fields_can_be_merged.py +74 -12
  18. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/scalar_leafs.py +9 -0
  19. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/version.py +2 -2
  20. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/PKG-INFO +2 -2
  21. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_parser.py +4 -0
  22. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_introspection.py +1 -1
  23. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_build_client_schema.py +1 -1
  24. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_lexicographic_sort_schema.py +132 -1
  25. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_overlapping_fields_can_be_merged.py +55 -0
  26. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_scalar_leafs.py +37 -1
  27. graphql_core-3.2.8/docs/requirements.txt +0 -2
  28. {graphql_core-3.2.8 → graphql_core-3.2.9}/.coveragerc +0 -0
  29. {graphql_core-3.2.8 → graphql_core-3.2.9}/.editorconfig +0 -0
  30. {graphql_core-3.2.8 → graphql_core-3.2.9}/.flake8 +0 -0
  31. {graphql_core-3.2.8 → graphql_core-3.2.9}/.mypy.ini +0 -0
  32. {graphql_core-3.2.8 → graphql_core-3.2.9}/CODEOWNERS +0 -0
  33. {graphql_core-3.2.8 → graphql_core-3.2.9}/LICENSE +0 -0
  34. {graphql_core-3.2.8 → graphql_core-3.2.9}/MANIFEST.in +0 -0
  35. {graphql_core-3.2.8 → graphql_core-3.2.9}/SECURITY.md +0 -0
  36. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/Makefile +0 -0
  37. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/diffs.rst +0 -0
  38. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/index.rst +0 -0
  39. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/intro.rst +0 -0
  40. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/make.bat +0 -0
  41. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/error.rst +0 -0
  42. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/execution.rst +0 -0
  43. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/graphql.rst +0 -0
  44. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/language.rst +0 -0
  45. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/pyutils.rst +0 -0
  46. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/type.rst +0 -0
  47. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/utilities.rst +0 -0
  48. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/modules/validation.rst +0 -0
  49. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/extension.rst +0 -0
  50. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/index.rst +0 -0
  51. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/methods.rst +0 -0
  52. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/other.rst +0 -0
  53. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/parser.rst +0 -0
  54. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/queries.rst +0 -0
  55. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/resolvers.rst +0 -0
  56. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/schema.rst +0 -0
  57. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/sdl.rst +0 -0
  58. {graphql_core-3.2.8 → graphql_core-3.2.9}/docs/usage/validator.rst +0 -0
  59. {graphql_core-3.2.8 → graphql_core-3.2.9}/poetry.lock +0 -0
  60. {graphql_core-3.2.8 → graphql_core-3.2.9}/setup.cfg +0 -0
  61. {graphql_core-3.2.8 → graphql_core-3.2.9}/setup.py +0 -0
  62. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/error/located_error.py +0 -0
  63. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/error/syntax_error.py +0 -0
  64. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/__init__.py +0 -0
  65. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/collect_fields.py +0 -0
  66. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/execute.py +0 -0
  67. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/map_async_iterator.py +0 -0
  68. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/middleware.py +0 -0
  69. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/subscribe.py +0 -0
  70. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/execution/values.py +0 -0
  71. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/graphql.py +0 -0
  72. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/__init__.py +0 -0
  73. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/block_string.py +0 -0
  74. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/character_classes.py +0 -0
  75. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/directive_locations.py +0 -0
  76. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/lexer.py +0 -0
  77. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/location.py +0 -0
  78. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/predicates.py +0 -0
  79. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/print_location.py +0 -0
  80. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/print_string.py +0 -0
  81. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/printer.py +0 -0
  82. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/source.py +0 -0
  83. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/token_kind.py +0 -0
  84. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/language/visitor.py +0 -0
  85. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/py.typed +0 -0
  86. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/__init__.py +0 -0
  87. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/awaitable_or_value.py +0 -0
  88. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/cached_property.py +0 -0
  89. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/convert_case.py +0 -0
  90. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/description.py +0 -0
  91. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/did_you_mean.py +0 -0
  92. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_dict.py +0 -0
  93. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_error.py +0 -0
  94. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_list.py +0 -0
  95. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/group_by.py +0 -0
  96. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/identity_func.py +0 -0
  97. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/inspect.py +0 -0
  98. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/is_awaitable.py +0 -0
  99. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/is_iterable.py +0 -0
  100. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/merge_kwargs.py +0 -0
  101. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/natural_compare.py +0 -0
  102. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/path.py +0 -0
  103. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/print_path_list.py +0 -0
  104. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/simple_pub_sub.py +0 -0
  105. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/suggestion_list.py +0 -0
  106. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/pyutils/undefined.py +0 -0
  107. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/subscription/__init__.py +0 -0
  108. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/__init__.py +0 -0
  109. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/assert_name.py +0 -0
  110. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/definition.py +0 -0
  111. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/directives.py +0 -0
  112. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/introspection.py +0 -0
  113. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/scalars.py +0 -0
  114. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/type/schema.py +0 -0
  115. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/__init__.py +0 -0
  116. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/assert_valid_name.py +0 -0
  117. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/ast_from_value.py +0 -0
  118. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/ast_to_dict.py +0 -0
  119. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/build_ast_schema.py +0 -0
  120. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/build_client_schema.py +0 -0
  121. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/coerce_input_value.py +0 -0
  122. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/concat_ast.py +0 -0
  123. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/extend_schema.py +0 -0
  124. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/find_breaking_changes.py +0 -0
  125. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/get_operation_ast.py +0 -0
  126. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/get_operation_root_type.py +0 -0
  127. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/introspection_from_schema.py +0 -0
  128. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/print_schema.py +0 -0
  129. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/separate_operations.py +0 -0
  130. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/sort_value_node.py +0 -0
  131. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/strip_ignored_characters.py +0 -0
  132. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/type_comparators.py +0 -0
  133. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/type_from_ast.py +0 -0
  134. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/type_info.py +0 -0
  135. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/value_from_ast.py +0 -0
  136. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/utilities/value_from_ast_untyped.py +0 -0
  137. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/__init__.py +0 -0
  138. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/__init__.py +0 -0
  139. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/__init__.py +0 -0
  140. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/no_deprecated.py +0 -0
  141. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/no_schema_introspection.py +0 -0
  142. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/executable_definitions.py +0 -0
  143. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/fields_on_correct_type.py +0 -0
  144. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/fragments_on_composite_types.py +0 -0
  145. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/known_argument_names.py +0 -0
  146. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/known_directives.py +0 -0
  147. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/known_fragment_names.py +0 -0
  148. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/known_type_names.py +0 -0
  149. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/lone_anonymous_operation.py +0 -0
  150. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/lone_schema_definition.py +0 -0
  151. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/max_introspection_depth_rule.py +0 -0
  152. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/no_fragment_cycles.py +0 -0
  153. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/no_undefined_variables.py +0 -0
  154. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/no_unused_fragments.py +0 -0
  155. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/no_unused_variables.py +0 -0
  156. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/possible_fragment_spreads.py +0 -0
  157. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/possible_type_extensions.py +0 -0
  158. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/provided_required_arguments.py +0 -0
  159. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/single_field_subscriptions.py +0 -0
  160. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_argument_definition_names.py +0 -0
  161. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_argument_names.py +0 -0
  162. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_directive_names.py +0 -0
  163. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_directives_per_location.py +0 -0
  164. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_enum_value_names.py +0 -0
  165. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_field_definition_names.py +0 -0
  166. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_fragment_names.py +0 -0
  167. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_input_field_names.py +0 -0
  168. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_operation_names.py +0 -0
  169. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_operation_types.py +0 -0
  170. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_type_names.py +0 -0
  171. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_variable_names.py +0 -0
  172. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/values_of_correct_type.py +0 -0
  173. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/variables_are_input_types.py +0 -0
  174. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/rules/variables_in_allowed_position.py +0 -0
  175. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/specified_rules.py +0 -0
  176. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/validate.py +0 -0
  177. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql/validation/validation_context.py +0 -0
  178. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/SOURCES.txt +0 -0
  179. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/dependency_links.txt +0 -0
  180. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/not-zip-safe +0 -0
  181. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/requires.txt +0 -0
  182. {graphql_core-3.2.8 → graphql_core-3.2.9}/src/graphql_core.egg-info/top_level.txt +0 -0
  183. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/__init__.py +0 -0
  184. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/__init__.py +0 -0
  185. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_build_ast_schema.py +0 -0
  186. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_build_client_schema.py +0 -0
  187. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_execution_async.py +0 -0
  188. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_execution_sync.py +0 -0
  189. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_introspection_from_schema.py +0 -0
  190. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_parser.py +0 -0
  191. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_repeated_fields.py +0 -0
  192. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_validate_gql.py +0 -0
  193. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_validate_invalid_gql.py +0 -0
  194. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_validate_sdl.py +0 -0
  195. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/benchmarks/test_visit.py +0 -0
  196. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/conftest.py +0 -0
  197. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/error/__init__.py +0 -0
  198. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/error/test_graphql_error.py +0 -0
  199. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/error/test_located_error.py +0 -0
  200. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/error/test_print_location.py +0 -0
  201. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/__init__.py +0 -0
  202. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_abstract.py +0 -0
  203. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_customize.py +0 -0
  204. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_directives.py +0 -0
  205. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_execution_result.py +0 -0
  206. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_executor.py +0 -0
  207. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_lists.py +0 -0
  208. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_map_async_iterator.py +0 -0
  209. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_middleware.py +0 -0
  210. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_mutations.py +0 -0
  211. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_nonnull.py +0 -0
  212. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_one_of.py +0 -0
  213. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_parallel.py +0 -0
  214. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_resolve.py +0 -0
  215. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_schema.py +0 -0
  216. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_subscribe.py +0 -0
  217. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_sync.py +0 -0
  218. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_union_interface.py +0 -0
  219. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/execution/test_variables.py +0 -0
  220. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/fixtures/__init__.py +0 -0
  221. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/fixtures/github_schema.graphql +0 -0
  222. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/fixtures/github_schema.json +0 -0
  223. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/fixtures/kitchen_sink.graphql +0 -0
  224. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/fixtures/schema_kitchen_sink.graphql +0 -0
  225. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/__init__.py +0 -0
  226. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_ast.py +0 -0
  227. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_block_string.py +0 -0
  228. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_block_string_fuzz.py +0 -0
  229. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_character_classes.py +0 -0
  230. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_lexer.py +0 -0
  231. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_location.py +0 -0
  232. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_predicates.py +0 -0
  233. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_print_string.py +0 -0
  234. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_printer.py +0 -0
  235. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_schema_parser.py +0 -0
  236. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_schema_printer.py +0 -0
  237. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_source.py +0 -0
  238. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/language/test_visitor.py +0 -0
  239. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/__init__.py +0 -0
  240. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_cached_property.py +0 -0
  241. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_convert_case.py +0 -0
  242. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_description.py +0 -0
  243. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_did_you_mean.py +0 -0
  244. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_frozen_dict.py +0 -0
  245. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_frozen_error.py +0 -0
  246. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_frozen_list.py +0 -0
  247. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_group_by.py +0 -0
  248. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_identity_func.py +0 -0
  249. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_inspect.py +0 -0
  250. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_is_awaitable.py +0 -0
  251. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_is_iterable.py +0 -0
  252. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_merge_kwargs.py +0 -0
  253. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_natural_compare.py +0 -0
  254. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_path.py +0 -0
  255. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_print_path_list.py +0 -0
  256. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_simple_pub_sub.py +0 -0
  257. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_suggestion_list.py +0 -0
  258. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/pyutils/test_undefined.py +0 -0
  259. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/star_wars_data.py +0 -0
  260. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/star_wars_schema.py +0 -0
  261. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_docs.py +0 -0
  262. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_star_wars_introspection.py +0 -0
  263. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_star_wars_query.py +0 -0
  264. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_star_wars_validation.py +0 -0
  265. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_user_registry.py +0 -0
  266. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/test_version.py +0 -0
  267. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/__init__.py +0 -0
  268. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_assert_name.py +0 -0
  269. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_custom_scalars.py +0 -0
  270. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_definition.py +0 -0
  271. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_directives.py +0 -0
  272. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_enum.py +0 -0
  273. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_extensions.py +0 -0
  274. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_predicate.py +0 -0
  275. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_scalars.py +0 -0
  276. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_schema.py +0 -0
  277. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/type/test_validation.py +0 -0
  278. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/__init__.py +0 -0
  279. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_ast_from_value.py +0 -0
  280. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_ast_to_dict.py +0 -0
  281. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_build_ast_schema.py +0 -0
  282. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_coerce_input_value.py +0 -0
  283. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_concat_ast.py +0 -0
  284. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_extend_schema.py +0 -0
  285. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_find_breaking_changes.py +0 -0
  286. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_get_introspection_query.py +0 -0
  287. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_get_operation_ast.py +0 -0
  288. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_get_operation_root_type.py +0 -0
  289. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_introspection_from_schema.py +0 -0
  290. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_print_schema.py +0 -0
  291. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_separate_operations.py +0 -0
  292. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_sort_value_node.py +0 -0
  293. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_strip_ignored_characters.py +0 -0
  294. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_strip_ignored_characters_fuzz.py +0 -0
  295. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_type_comparators.py +0 -0
  296. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_type_from_ast.py +0 -0
  297. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_type_info.py +0 -0
  298. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_value_from_ast.py +0 -0
  299. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utilities/test_value_from_ast_untyped.py +0 -0
  300. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utils/__init__.py +0 -0
  301. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utils/dedent.py +0 -0
  302. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utils/gen_fuzz_strings.py +0 -0
  303. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utils/test_dedent.py +0 -0
  304. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/utils/test_gen_fuzz_strings.py +0 -0
  305. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/__init__.py +0 -0
  306. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/harness.py +0 -0
  307. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_executable_definitions.py +0 -0
  308. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_fields_on_correct_type.py +0 -0
  309. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_fragments_on_composite_types.py +0 -0
  310. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_known_argument_names.py +0 -0
  311. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_known_directives.py +0 -0
  312. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_known_fragment_names.py +0 -0
  313. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_known_type_names.py +0 -0
  314. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_lone_anonymous_operation.py +0 -0
  315. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_lone_schema_definition.py +0 -0
  316. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_max_introspection_depth_rule.py +0 -0
  317. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_deprecated.py +0 -0
  318. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_fragment_cycles.py +0 -0
  319. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_schema_introspection.py +0 -0
  320. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_undefined_variables.py +0 -0
  321. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_unused_fragments.py +0 -0
  322. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_no_unused_variables.py +0 -0
  323. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_possible_fragment_spreads.py +0 -0
  324. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_possible_type_extensions.py +0 -0
  325. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_provided_required_arguments.py +0 -0
  326. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_single_field_subscriptions.py +0 -0
  327. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_argument_definition_names.py +0 -0
  328. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_argument_names.py +0 -0
  329. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_directive_names.py +0 -0
  330. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_directives_per_location.py +0 -0
  331. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_enum_value_names.py +0 -0
  332. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_field_definition_names.py +0 -0
  333. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_fragment_names.py +0 -0
  334. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_input_field_names.py +0 -0
  335. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_operation_names.py +0 -0
  336. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_operation_types.py +0 -0
  337. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_type_names.py +0 -0
  338. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_unique_variable_names.py +0 -0
  339. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_validation.py +0 -0
  340. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_values_of_correct_type.py +0 -0
  341. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_variables_are_input_types.py +0 -0
  342. {graphql_core-3.2.8 → graphql_core-3.2.9}/tests/validation/test_variables_in_allowed_position.py +0 -0
  343. {graphql_core-3.2.8 → graphql_core-3.2.9}/tox.ini +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.2.8
2
+ current_version = 3.2.9
3
3
  commit = False
4
4
  tag = False
5
5
 
@@ -5,9 +5,9 @@
5
5
  version: 2
6
6
 
7
7
  build:
8
- os: ubuntu-20.04
8
+ os: ubuntu-24.04
9
9
  tools:
10
- python: "3.9"
10
+ python: "3.12"
11
11
 
12
12
  sphinx:
13
13
  configuration: docs/conf.py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphql-core
3
- Version: 3.2.8
3
+ Version: 3.2.9
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.8 of GraphQL-core is up-to-date with GraphQL.js version 16.9.0.
53
+ The current version 3.2.9 of GraphQL-core is up-to-date with GraphQL.js version 16.10.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.8 of GraphQL-core is up-to-date with GraphQL.js version 16.9.0.
13
+ The current version 3.2.9 of GraphQL-core is up-to-date with GraphQL.js version 16.10.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
@@ -61,7 +61,7 @@ author = "Christoph Zwerschke"
61
61
  # The short X.Y version.
62
62
  # version = '3.2'
63
63
  # The full version, including alpha/beta/rc tags.
64
- version = release = "3.2.8"
64
+ version = release = "3.2.9"
65
65
 
66
66
  # The language for content autogenerated by Sphinx. Refer to documentation
67
67
  # for a list of supported languages.
@@ -148,6 +148,7 @@ EnterLeaveVisitor
148
148
  FormattedSourceLocation
149
149
  GraphQLAbstractType
150
150
  GraphQLErrorExtensions
151
+ GraphQLFormattedErrorExtensions
151
152
  GraphQLOutputType
152
153
  asyncio.events.AbstractEventLoop
153
154
  graphql.execution.map_async_iterator.MapAsyncIterator
@@ -0,0 +1,2 @@
1
+ sphinx>=9.1,<10
2
+ sphinx_rtd_theme>=3.1,<4
@@ -28,7 +28,7 @@ The ``data`` attribute of the introspection query result now gives us a dictiona
28
28
  which constitutes a third way of describing a GraphQL schema::
29
29
 
30
30
  {'__schema': {
31
- 'queryType': {'name': 'Query'},
31
+ 'queryType': {'name': 'Query', 'kind': 'OBJECT'},
32
32
  'mutationType': None, 'subscriptionType': None,
33
33
  'types': [
34
34
  {'kind': 'OBJECT', 'name': 'Query', 'description': None,
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "graphql-core"
3
- version = "3.2.8"
3
+ version = "3.2.9"
4
4
  description = """
5
5
  GraphQL-core is a Python port of GraphQL.js,\
6
6
  the JavaScript reference implementation for GraphQL."""
@@ -48,6 +48,7 @@ from .error import (
48
48
  GraphQLError,
49
49
  GraphQLErrorExtensions,
50
50
  GraphQLFormattedError,
51
+ GraphQLFormattedErrorExtensions,
51
52
  GraphQLSyntaxError,
52
53
  located_error,
53
54
  )
@@ -748,6 +749,7 @@ __all__ = [
748
749
  "GraphQLError",
749
750
  "GraphQLErrorExtensions",
750
751
  "GraphQLFormattedError",
752
+ "GraphQLFormattedErrorExtensions",
751
753
  "GraphQLSyntaxError",
752
754
  "located_error",
753
755
  "get_introspection_query",
@@ -4,7 +4,12 @@ The :mod:`graphql.error` package is responsible for creating and formatting Grap
4
4
  errors.
5
5
  """
6
6
 
7
- from .graphql_error import GraphQLError, GraphQLErrorExtensions, GraphQLFormattedError
7
+ from .graphql_error import (
8
+ GraphQLError,
9
+ GraphQLErrorExtensions,
10
+ GraphQLFormattedError,
11
+ GraphQLFormattedErrorExtensions,
12
+ )
8
13
 
9
14
  from .syntax_error import GraphQLSyntaxError
10
15
 
@@ -14,6 +19,7 @@ __all__ = [
14
19
  "GraphQLError",
15
20
  "GraphQLErrorExtensions",
16
21
  "GraphQLFormattedError",
22
+ "GraphQLFormattedErrorExtensions",
17
23
  "GraphQLSyntaxError",
18
24
  "located_error",
19
25
  ]
@@ -14,7 +14,12 @@ if TYPE_CHECKING:
14
14
  ) # noqa: F401
15
15
  from ..language.source import Source # noqa: F401
16
16
 
17
- __all__ = ["GraphQLError", "GraphQLErrorExtensions", "GraphQLFormattedError"]
17
+ __all__ = [
18
+ "GraphQLError",
19
+ "GraphQLErrorExtensions",
20
+ "GraphQLFormattedError",
21
+ "GraphQLFormattedErrorExtensions",
22
+ ]
18
23
 
19
24
 
20
25
  # Custom extensions
@@ -25,6 +30,14 @@ GraphQLErrorExtensions = Dict[str, Any]
25
30
  # a dictionary which can contain all the values you need.
26
31
 
27
32
 
33
+ # Custom formatted extensions
34
+ GraphQLFormattedErrorExtensions = Dict[str, Any]
35
+ # Use a unique identifier name for your extension, for example the name of
36
+ # your library or project. Do not use a shortened identifier as this increases
37
+ # the risk of conflicts. We recommend you add at most one extension key,
38
+ # a dictionary which can contain all the values you need.
39
+
40
+
28
41
  class GraphQLFormattedError(TypedDict, total=False):
29
42
  """Formatted GraphQL error"""
30
43
 
@@ -41,7 +54,7 @@ class GraphQLFormattedError(TypedDict, total=False):
41
54
  path: List[Union[str, int]]
42
55
  # Reserved for implementors to extend the protocol however they see fit,
43
56
  # and hence there are no additional restrictions on its contents.
44
- extensions: GraphQLErrorExtensions
57
+ extensions: GraphQLFormattedErrorExtensions
45
58
 
46
59
 
47
60
  class GraphQLError(Exception):
@@ -411,6 +411,11 @@ class DocumentNode(Node):
411
411
  __slots__ = ("definitions",)
412
412
 
413
413
  definitions: Tuple["DefinitionNode", ...]
414
+ # The number of tokens in the parsed document. Set by the parser per instance
415
+ # and deliberately kept out of ``__slots__`` (and therefore out of ``keys``) so
416
+ # that it is not treated as a traversable attribute, the equivalent of the
417
+ # non-enumerable ``tokenCount`` property in graphql-js.
418
+ token_count: int = 0
414
419
 
415
420
 
416
421
  class DefinitionNode(Node):
@@ -234,13 +234,21 @@ class Parser:
234
234
 
235
235
  # Implement the parsing rules in the Document section.
236
236
 
237
+ @property
238
+ def token_count(self) -> int:
239
+ """Get the number of tokens that have been parsed so far."""
240
+ return self._token_counter
241
+
237
242
  def parse_document(self) -> DocumentNode:
238
243
  """Document: Definition+"""
239
244
  start = self._lexer.token
240
- return DocumentNode(
245
+ document = DocumentNode(
241
246
  definitions=self.many(TokenKind.SOF, self.parse_definition, TokenKind.EOF),
242
247
  loc=self.loc(start),
243
248
  )
249
+ # Expose the token count as a (non-traversable) attribute on the document.
250
+ document.token_count = self.token_count
251
+ return document
244
252
 
245
253
  _parse_type_system_definition_method_names: Dict[str, str] = {
246
254
  "schema": "schema_definition",
@@ -1177,12 +1185,12 @@ class Parser:
1177
1185
  return nodes
1178
1186
 
1179
1187
  def advance_lexer(self) -> None:
1180
- max_tokens = self._max_tokens
1181
1188
  token = self._lexer.advance()
1182
1189
 
1183
- if max_tokens is not None and token.kind != TokenKind.EOF:
1190
+ if token.kind != TokenKind.EOF:
1184
1191
  self._token_counter += 1
1185
- if self._token_counter > max_tokens:
1192
+ max_tokens = self._max_tokens
1193
+ if max_tokens is not None and self._token_counter > max_tokens:
1186
1194
  raise GraphQLSyntaxError(
1187
1195
  self._lexer.source,
1188
1196
  token.start,
@@ -589,7 +589,8 @@ class InputObjectCircularRefsValidator:
589
589
 
590
590
 
591
591
  def get_all_implements_interface_nodes(
592
- type_: Union[GraphQLObjectType, GraphQLInterfaceType], iface: GraphQLInterfaceType
592
+ type_: Union[GraphQLObjectType, GraphQLInterfaceType],
593
+ iface: Union[GraphQLObjectType, GraphQLInterfaceType],
593
594
  ) -> List[NamedTypeNode]:
594
595
  ast_node = type_.ast_node
595
596
  nodes = type_.extension_ast_nodes
@@ -55,9 +55,9 @@ def get_introspection_query(
55
55
  query IntrospectionQuery {{
56
56
  __schema {{
57
57
  {maybe_schema_description}
58
- queryType {{ name }}
59
- mutationType {{ name }}
60
- subscriptionType {{ name }}
58
+ queryType {{ name kind }}
59
+ mutationType {{ name kind }}
60
+ subscriptionType {{ name kind }}
61
61
  types {{
62
62
  ...FullType
63
63
  }}
@@ -92,13 +92,13 @@ def lexicographic_sort_schema(schema: GraphQLSchema) -> GraphQLSchema:
92
92
  ) -> Dict[str, GraphQLInputField]:
93
93
  return {
94
94
  name: GraphQLInputField(
95
- cast(
96
- GraphQLInputType, replace_type(cast(GraphQLNamedType, field.type))
97
- ),
98
- description=field.description,
99
- default_value=field.default_value,
100
- extensions=field.extensions,
101
- ast_node=field.ast_node,
95
+ **merge_kwargs(
96
+ field.to_kwargs(),
97
+ type_=cast(
98
+ GraphQLInputType,
99
+ replace_type(cast(GraphQLNamedType, field.type)),
100
+ ),
101
+ )
102
102
  )
103
103
  for name, field in sorted(fields_map.items())
104
104
  }
@@ -169,20 +169,24 @@ def lexicographic_sort_schema(schema: GraphQLSchema) -> GraphQLSchema:
169
169
  }
170
170
 
171
171
  return GraphQLSchema(
172
- types=type_map.values(),
173
- directives=[
174
- sort_directive(directive)
175
- for directive in sorted(schema.directives, key=sort_by_name_key)
176
- ],
177
- query=cast(Optional[GraphQLObjectType], replace_maybe_type(schema.query_type)),
178
- mutation=cast(
179
- Optional[GraphQLObjectType], replace_maybe_type(schema.mutation_type)
180
- ),
181
- subscription=cast(
182
- Optional[GraphQLObjectType], replace_maybe_type(schema.subscription_type)
183
- ),
184
- extensions=schema.extensions,
185
- ast_node=schema.ast_node,
172
+ **merge_kwargs(
173
+ schema.to_kwargs(),
174
+ types=type_map.values(),
175
+ directives=[
176
+ sort_directive(directive)
177
+ for directive in sorted(schema.directives, key=sort_by_name_key)
178
+ ],
179
+ query=cast(
180
+ Optional[GraphQLObjectType], replace_maybe_type(schema.query_type)
181
+ ),
182
+ mutation=cast(
183
+ Optional[GraphQLObjectType], replace_maybe_type(schema.mutation_type)
184
+ ),
185
+ subscription=cast(
186
+ Optional[GraphQLObjectType],
187
+ replace_maybe_type(schema.subscription_type),
188
+ ),
189
+ )
186
190
  )
187
191
 
188
192
 
@@ -56,9 +56,10 @@ class OverlappingFieldsCanBeMergedRule(ValidationRule):
56
56
 
57
57
  def __init__(self, context: ValidationContext):
58
58
  super().__init__(context)
59
- # A memoization for when two fragments are compared "between" each other for
60
- # conflicts. Two fragments may be compared many times, so memoizing this can
61
- # dramatically improve the performance of this validator.
59
+ # A memoization for when fields and a fragment or two fragments are compared
60
+ # "between" each other for conflicts. Comparisons may be made many times, so
61
+ # memoizing this can dramatically improve the performance of this validator.
62
+ self.compared_fields_and_fragment_pairs = OrderedPairSet()
62
63
  self.compared_fragment_pairs = PairSet()
63
64
 
64
65
  # A cache for the "field map" and list of fragment names found in any given
@@ -70,6 +71,7 @@ class OverlappingFieldsCanBeMergedRule(ValidationRule):
70
71
  conflicts = find_conflicts_within_selection_set(
71
72
  self.context,
72
73
  self.cached_fields_and_fragment_names,
74
+ self.compared_fields_and_fragment_pairs,
73
75
  self.compared_fragment_pairs,
74
76
  self.context.get_parent_type(),
75
77
  selection_set,
@@ -156,6 +158,7 @@ NodeAndDefCollection = Dict[str, List[NodeAndDef]]
156
158
  def find_conflicts_within_selection_set(
157
159
  context: ValidationContext,
158
160
  cached_fields_and_fragment_names: Dict,
161
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
159
162
  compared_fragment_pairs: "PairSet",
160
163
  parent_type: Optional[GraphQLNamedType],
161
164
  selection_set: SelectionSetNode,
@@ -179,6 +182,7 @@ def find_conflicts_within_selection_set(
179
182
  context,
180
183
  conflicts,
181
184
  cached_fields_and_fragment_names,
185
+ compared_fields_and_fragment_pairs,
182
186
  compared_fragment_pairs,
183
187
  field_map,
184
188
  )
@@ -191,6 +195,7 @@ def find_conflicts_within_selection_set(
191
195
  context,
192
196
  conflicts,
193
197
  cached_fields_and_fragment_names,
198
+ compared_fields_and_fragment_pairs,
194
199
  compared_fragment_pairs,
195
200
  False,
196
201
  field_map,
@@ -205,6 +210,7 @@ def find_conflicts_within_selection_set(
205
210
  context,
206
211
  conflicts,
207
212
  cached_fields_and_fragment_names,
213
+ compared_fields_and_fragment_pairs,
208
214
  compared_fragment_pairs,
209
215
  False,
210
216
  fragment_name,
@@ -218,6 +224,7 @@ def collect_conflicts_between_fields_and_fragment(
218
224
  context: ValidationContext,
219
225
  conflicts: List[Conflict],
220
226
  cached_fields_and_fragment_names: Dict,
227
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
221
228
  compared_fragment_pairs: "PairSet",
222
229
  are_mutually_exclusive: bool,
223
230
  field_map: NodeAndDefCollection,
@@ -228,6 +235,16 @@ def collect_conflicts_between_fields_and_fragment(
228
235
  Collect all conflicts found between a set of fields and a fragment reference
229
236
  including via spreading in any nested fragments.
230
237
  """
238
+ # Memoize so the fields and fragments are not compared for conflicts more
239
+ # than once.
240
+ if compared_fields_and_fragment_pairs.has(
241
+ field_map, fragment_name, are_mutually_exclusive
242
+ ):
243
+ return
244
+ compared_fields_and_fragment_pairs.add(
245
+ field_map, fragment_name, are_mutually_exclusive
246
+ )
247
+
231
248
  fragment = context.get_fragment(fragment_name)
232
249
  if not fragment:
233
250
  return None
@@ -246,6 +263,7 @@ def collect_conflicts_between_fields_and_fragment(
246
263
  context,
247
264
  conflicts,
248
265
  cached_fields_and_fragment_names,
266
+ compared_fields_and_fragment_pairs,
249
267
  compared_fragment_pairs,
250
268
  are_mutually_exclusive,
251
269
  field_map,
@@ -255,19 +273,11 @@ def collect_conflicts_between_fields_and_fragment(
255
273
  # (E) Then collect any conflicts between the provided collection of fields and any
256
274
  # fragment names found in the given fragment.
257
275
  for referenced_fragment_name in referenced_fragment_names:
258
- # Memoize so two fragments are not compared for conflicts more than once.
259
- if compared_fragment_pairs.has(
260
- referenced_fragment_name, fragment_name, are_mutually_exclusive
261
- ):
262
- continue
263
- compared_fragment_pairs.add(
264
- referenced_fragment_name, fragment_name, are_mutually_exclusive
265
- )
266
-
267
276
  collect_conflicts_between_fields_and_fragment(
268
277
  context,
269
278
  conflicts,
270
279
  cached_fields_and_fragment_names,
280
+ compared_fields_and_fragment_pairs,
271
281
  compared_fragment_pairs,
272
282
  are_mutually_exclusive,
273
283
  field_map,
@@ -279,6 +289,7 @@ def collect_conflicts_between_fragments(
279
289
  context: ValidationContext,
280
290
  conflicts: List[Conflict],
281
291
  cached_fields_and_fragment_names: Dict,
292
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
282
293
  compared_fragment_pairs: "PairSet",
283
294
  are_mutually_exclusive: bool,
284
295
  fragment_name1: str,
@@ -319,6 +330,7 @@ def collect_conflicts_between_fragments(
319
330
  context,
320
331
  conflicts,
321
332
  cached_fields_and_fragment_names,
333
+ compared_fields_and_fragment_pairs,
322
334
  compared_fragment_pairs,
323
335
  are_mutually_exclusive,
324
336
  field_map1,
@@ -332,6 +344,7 @@ def collect_conflicts_between_fragments(
332
344
  context,
333
345
  conflicts,
334
346
  cached_fields_and_fragment_names,
347
+ compared_fields_and_fragment_pairs,
335
348
  compared_fragment_pairs,
336
349
  are_mutually_exclusive,
337
350
  fragment_name1,
@@ -345,6 +358,7 @@ def collect_conflicts_between_fragments(
345
358
  context,
346
359
  conflicts,
347
360
  cached_fields_and_fragment_names,
361
+ compared_fields_and_fragment_pairs,
348
362
  compared_fragment_pairs,
349
363
  are_mutually_exclusive,
350
364
  referenced_fragment_name1,
@@ -355,6 +369,7 @@ def collect_conflicts_between_fragments(
355
369
  def find_conflicts_between_sub_selection_sets(
356
370
  context: ValidationContext,
357
371
  cached_fields_and_fragment_names: Dict,
372
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
358
373
  compared_fragment_pairs: "PairSet",
359
374
  are_mutually_exclusive: bool,
360
375
  parent_type1: Optional[GraphQLNamedType],
@@ -382,6 +397,7 @@ def find_conflicts_between_sub_selection_sets(
382
397
  context,
383
398
  conflicts,
384
399
  cached_fields_and_fragment_names,
400
+ compared_fields_and_fragment_pairs,
385
401
  compared_fragment_pairs,
386
402
  are_mutually_exclusive,
387
403
  field_map1,
@@ -396,6 +412,7 @@ def find_conflicts_between_sub_selection_sets(
396
412
  context,
397
413
  conflicts,
398
414
  cached_fields_and_fragment_names,
415
+ compared_fields_and_fragment_pairs,
399
416
  compared_fragment_pairs,
400
417
  are_mutually_exclusive,
401
418
  field_map1,
@@ -410,6 +427,7 @@ def find_conflicts_between_sub_selection_sets(
410
427
  context,
411
428
  conflicts,
412
429
  cached_fields_and_fragment_names,
430
+ compared_fields_and_fragment_pairs,
413
431
  compared_fragment_pairs,
414
432
  are_mutually_exclusive,
415
433
  field_map2,
@@ -425,6 +443,7 @@ def find_conflicts_between_sub_selection_sets(
425
443
  context,
426
444
  conflicts,
427
445
  cached_fields_and_fragment_names,
446
+ compared_fields_and_fragment_pairs,
428
447
  compared_fragment_pairs,
429
448
  are_mutually_exclusive,
430
449
  fragment_name1,
@@ -438,6 +457,7 @@ def collect_conflicts_within(
438
457
  context: ValidationContext,
439
458
  conflicts: List[Conflict],
440
459
  cached_fields_and_fragment_names: Dict,
460
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
441
461
  compared_fragment_pairs: "PairSet",
442
462
  field_map: NodeAndDefCollection,
443
463
  ) -> None:
@@ -456,6 +476,7 @@ def collect_conflicts_within(
456
476
  conflict = find_conflict(
457
477
  context,
458
478
  cached_fields_and_fragment_names,
479
+ compared_fields_and_fragment_pairs,
459
480
  compared_fragment_pairs,
460
481
  # within one collection is never mutually exclusive
461
482
  False,
@@ -471,6 +492,7 @@ def collect_conflicts_between(
471
492
  context: ValidationContext,
472
493
  conflicts: List[Conflict],
473
494
  cached_fields_and_fragment_names: Dict,
495
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
474
496
  compared_fragment_pairs: "PairSet",
475
497
  parent_fields_are_mutually_exclusive: bool,
476
498
  field_map1: NodeAndDefCollection,
@@ -496,6 +518,7 @@ def collect_conflicts_between(
496
518
  conflict = find_conflict(
497
519
  context,
498
520
  cached_fields_and_fragment_names,
521
+ compared_fields_and_fragment_pairs,
499
522
  compared_fragment_pairs,
500
523
  parent_fields_are_mutually_exclusive,
501
524
  response_name,
@@ -509,6 +532,7 @@ def collect_conflicts_between(
509
532
  def find_conflict(
510
533
  context: ValidationContext,
511
534
  cached_fields_and_fragment_names: Dict,
535
+ compared_fields_and_fragment_pairs: "OrderedPairSet",
512
536
  compared_fragment_pairs: "PairSet",
513
537
  parent_fields_are_mutually_exclusive: bool,
514
538
  response_name: str,
@@ -570,6 +594,7 @@ def find_conflict(
570
594
  conflicts = find_conflicts_between_sub_selection_sets(
571
595
  context,
572
596
  cached_fields_and_fragment_names,
597
+ compared_fields_and_fragment_pairs,
573
598
  compared_fragment_pairs,
574
599
  are_mutually_exclusive,
575
600
  get_named_type(type1),
@@ -745,6 +770,43 @@ def subfield_conflicts(
745
770
  return None # no conflict
746
771
 
747
772
 
773
+ class OrderedPairSet:
774
+ """Ordered pair set
775
+
776
+ A way to keep track of pairs of things where the ordering of the pair matters.
777
+
778
+ Provides a third argument for has/add to allow flagging the pair as weakly or
779
+ strongly present within the collection.
780
+
781
+ The first element is matched by object identity (its ``id``), since field maps
782
+ are unhashable mappings that are kept alive for the duration of the validation.
783
+ """
784
+
785
+ __slots__ = ("_data",)
786
+
787
+ _data: Dict[int, Dict[str, bool]]
788
+
789
+ def __init__(self) -> None:
790
+ self._data = {}
791
+
792
+ def has(self, a: NodeAndDefCollection, b: str, weakly_present: bool) -> bool:
793
+ map_ = self._data.get(id(a))
794
+ if map_ is None:
795
+ return False
796
+ result = map_.get(b)
797
+ if result is None:
798
+ return False
799
+
800
+ return True if weakly_present else weakly_present == result
801
+
802
+ def add(self, a: NodeAndDefCollection, b: str, weakly_present: bool) -> None:
803
+ map_ = self._data.get(id(a))
804
+ if map_ is None:
805
+ self._data[id(a)] = {b: weakly_present}
806
+ else:
807
+ map_[b] = weakly_present
808
+
809
+
748
810
  class PairSet:
749
811
  """Pair set
750
812
 
@@ -39,3 +39,12 @@ class ScalarLeafsRule(ValidationRule):
39
39
  node,
40
40
  )
41
41
  )
42
+ elif not selection_set.selections:
43
+ field_name = node.name.value
44
+ self.report_error(
45
+ GraphQLError(
46
+ f"Field '{field_name}' of type '{type_}'"
47
+ " must have at least one field selected.",
48
+ node,
49
+ )
50
+ )
@@ -4,9 +4,9 @@ from typing import NamedTuple
4
4
  __all__ = ["version", "version_info", "version_js", "version_info_js"]
5
5
 
6
6
 
7
- version = "3.2.8"
7
+ version = "3.2.9"
8
8
 
9
- version_js = "16.9.0"
9
+ version_js = "16.10.0"
10
10
 
11
11
 
12
12
  _re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(\D*)(\d*)")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphql-core
3
- Version: 3.2.8
3
+ Version: 3.2.9
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.8 of GraphQL-core is up-to-date with GraphQL.js version 16.9.0.
53
+ The current version 3.2.9 of GraphQL-core is up-to-date with GraphQL.js version 16.10.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
@@ -87,6 +87,10 @@ def describe_parser():
87
87
  | ^
88
88
  """)
89
89
 
90
+ def exposes_the_token_count():
91
+ assert parse("{ foo }").token_count == 3
92
+ assert parse('{ foo(bar: "baz") }').token_count == 8
93
+
90
94
  def limits_maximum_number_of_tokens():
91
95
  assert parse("{ foo }", max_tokens=3)
92
96
  with raises(
@@ -22,7 +22,7 @@ def describe_introspection():
22
22
  assert result.errors is None
23
23
  assert result.data == {
24
24
  "__schema": {
25
- "queryType": {"name": "SomeObject"},
25
+ "queryType": {"name": "SomeObject", "kind": "OBJECT"},
26
26
  "mutationType": None,
27
27
  "subscriptionType": None,
28
28
  "types": [
@@ -687,7 +687,7 @@ def describe_type_system_build_schema_from_introspection():
687
687
  with raises(TypeError) as exc_info:
688
688
  build_client_schema(introspection)
689
689
 
690
- assert str(exc_info.value) == "Unknown type reference: {}."
690
+ assert str(exc_info.value) == "Unknown type reference: {'kind': 'OBJECT'}."
691
691
 
692
692
  def throws_when_missing_kind():
693
693
  introspection = introspection_from_schema(dummy_schema)