graphql-core 3.2.7__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 (344) hide show
  1. {graphql_core-3.2.7 → graphql_core-3.2.9}/.bumpversion.cfg +1 -1
  2. {graphql_core-3.2.7 → graphql_core-3.2.9}/.readthedocs.yaml +2 -2
  3. {graphql_core-3.2.7 → graphql_core-3.2.9}/PKG-INFO +2 -2
  4. {graphql_core-3.2.7 → graphql_core-3.2.9}/README.md +1 -1
  5. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/conf.py +5 -2
  6. graphql_core-3.2.9/docs/requirements.txt +2 -0
  7. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/introspection.rst +1 -1
  8. {graphql_core-3.2.7 → graphql_core-3.2.9}/poetry.lock +1 -1
  9. {graphql_core-3.2.7 → graphql_core-3.2.9}/pyproject.toml +2 -2
  10. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/__init__.py +2 -0
  11. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/error/__init__.py +7 -1
  12. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/error/graphql_error.py +15 -2
  13. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/ast.py +5 -0
  14. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/parser.py +12 -4
  15. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/print_location.py +0 -1
  16. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/description.py +4 -4
  17. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/introspection.py +3 -0
  18. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/validate.py +8 -1
  19. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/get_introspection_query.py +5 -7
  20. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/lexicographic_sort_schema.py +25 -21
  21. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/type_comparators.py +2 -2
  22. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/overlapping_fields_can_be_merged.py +74 -12
  23. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/scalar_leafs.py +9 -0
  24. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/version.py +2 -2
  25. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/PKG-INFO +2 -2
  26. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_execution_async.py +0 -1
  27. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_execution_sync.py +0 -1
  28. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_validate_invalid_gql.py +2 -4
  29. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/error/test_graphql_error.py +10 -23
  30. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/error/test_print_location.py +10 -20
  31. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_abstract.py +8 -16
  32. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_directives.py +30 -60
  33. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_executor.py +34 -68
  34. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_mutations.py +4 -8
  35. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_nonnull.py +16 -32
  36. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_one_of.py +2 -5
  37. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_parallel.py +2 -4
  38. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_resolve.py +6 -12
  39. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_schema.py +2 -4
  40. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_subscribe.py +6 -12
  41. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_union_interface.py +14 -28
  42. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_variables.py +48 -96
  43. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_block_string_fuzz.py +4 -8
  44. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_lexer.py +10 -23
  45. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_parser.py +24 -44
  46. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_printer.py +14 -28
  47. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_schema_parser.py +22 -44
  48. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_schema_printer.py +2 -4
  49. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_source.py +2 -4
  50. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_visitor.py +2 -4
  51. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_description.py +2 -4
  52. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_star_wars_introspection.py +18 -36
  53. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_enum.py +6 -12
  54. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_introspection.py +31 -61
  55. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_schema.py +2 -4
  56. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_validation.py +215 -405
  57. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_ast_to_dict.py +8 -16
  58. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_build_ast_schema.py +126 -254
  59. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_build_client_schema.py +57 -113
  60. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_concat_ast.py +6 -12
  61. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_extend_schema.py +160 -324
  62. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_find_breaking_changes.py +126 -252
  63. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_get_introspection_query.py +2 -4
  64. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_get_operation_ast.py +8 -16
  65. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_get_operation_root_type.py +2 -5
  66. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_introspection_from_schema.py +4 -8
  67. graphql_core-3.2.9/tests/utilities/test_lexicographic_sort_schema.py +475 -0
  68. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_print_schema.py +72 -144
  69. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_separate_operations.py +24 -50
  70. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_strip_ignored_characters.py +12 -24
  71. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_strip_ignored_characters_fuzz.py +2 -4
  72. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_type_info.py +8 -17
  73. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utils/__init__.py +0 -1
  74. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utils/test_dedent.py +14 -45
  75. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/harness.py +2 -4
  76. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_executable_definitions.py +4 -8
  77. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_fields_on_correct_type.py +34 -68
  78. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_fragments_on_composite_types.py +12 -24
  79. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_known_argument_names.py +22 -44
  80. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_known_directives.py +22 -44
  81. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_known_fragment_names.py +2 -4
  82. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_known_type_names.py +6 -12
  83. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_lone_anonymous_operation.py +8 -16
  84. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_lone_schema_definition.py +12 -24
  85. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_max_introspection_depth_rule.py +8 -16
  86. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_deprecated.py +30 -60
  87. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_fragment_cycles.py +10 -20
  88. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_schema_introspection.py +6 -12
  89. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_undefined_variables.py +14 -28
  90. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_unused_fragments.py +4 -8
  91. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_no_unused_variables.py +12 -24
  92. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_overlapping_fields_can_be_merged.py +93 -76
  93. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_possible_fragment_spreads.py +28 -56
  94. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_possible_type_extensions.py +10 -20
  95. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_provided_required_arguments.py +34 -68
  96. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_scalar_leafs.py +41 -9
  97. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_single_field_subscriptions.py +10 -20
  98. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_argument_definition_names.py +6 -12
  99. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_argument_names.py +18 -36
  100. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_directive_names.py +8 -16
  101. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_directives_per_location.py +14 -28
  102. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_enum_value_names.py +10 -20
  103. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_field_definition_names.py +14 -28
  104. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_fragment_names.py +10 -20
  105. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_input_field_names.py +8 -16
  106. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_operation_names.py +12 -24
  107. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_operation_types.py +14 -28
  108. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_type_names.py +8 -16
  109. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_unique_variable_names.py +2 -4
  110. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_validation.py +10 -20
  111. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_values_of_correct_type.py +76 -152
  112. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_variables_are_input_types.py +4 -8
  113. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/test_variables_in_allowed_position.py +30 -60
  114. {graphql_core-3.2.7 → graphql_core-3.2.9}/tox.ini +4 -4
  115. graphql_core-3.2.7/docs/requirements.txt +0 -2
  116. graphql_core-3.2.7/tests/utilities/test_lexicographic_sort_schema.py +0 -384
  117. {graphql_core-3.2.7 → graphql_core-3.2.9}/.coveragerc +0 -0
  118. {graphql_core-3.2.7 → graphql_core-3.2.9}/.editorconfig +0 -0
  119. {graphql_core-3.2.7 → graphql_core-3.2.9}/.flake8 +0 -0
  120. {graphql_core-3.2.7 → graphql_core-3.2.9}/.mypy.ini +0 -0
  121. {graphql_core-3.2.7 → graphql_core-3.2.9}/CODEOWNERS +0 -0
  122. {graphql_core-3.2.7 → graphql_core-3.2.9}/LICENSE +0 -0
  123. {graphql_core-3.2.7 → graphql_core-3.2.9}/MANIFEST.in +0 -0
  124. {graphql_core-3.2.7 → graphql_core-3.2.9}/SECURITY.md +0 -0
  125. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/Makefile +0 -0
  126. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/diffs.rst +0 -0
  127. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/index.rst +0 -0
  128. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/intro.rst +0 -0
  129. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/make.bat +0 -0
  130. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/error.rst +0 -0
  131. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/execution.rst +0 -0
  132. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/graphql.rst +0 -0
  133. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/language.rst +0 -0
  134. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/pyutils.rst +0 -0
  135. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/type.rst +0 -0
  136. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/utilities.rst +0 -0
  137. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/modules/validation.rst +0 -0
  138. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/extension.rst +0 -0
  139. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/index.rst +0 -0
  140. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/methods.rst +0 -0
  141. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/other.rst +0 -0
  142. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/parser.rst +0 -0
  143. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/queries.rst +0 -0
  144. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/resolvers.rst +0 -0
  145. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/schema.rst +0 -0
  146. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/sdl.rst +0 -0
  147. {graphql_core-3.2.7 → graphql_core-3.2.9}/docs/usage/validator.rst +0 -0
  148. {graphql_core-3.2.7 → graphql_core-3.2.9}/setup.cfg +0 -0
  149. {graphql_core-3.2.7 → graphql_core-3.2.9}/setup.py +0 -0
  150. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/error/located_error.py +0 -0
  151. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/error/syntax_error.py +0 -0
  152. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/__init__.py +0 -0
  153. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/collect_fields.py +0 -0
  154. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/execute.py +0 -0
  155. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/map_async_iterator.py +0 -0
  156. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/middleware.py +0 -0
  157. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/subscribe.py +0 -0
  158. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/execution/values.py +0 -0
  159. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/graphql.py +0 -0
  160. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/__init__.py +0 -0
  161. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/block_string.py +0 -0
  162. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/character_classes.py +0 -0
  163. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/directive_locations.py +0 -0
  164. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/lexer.py +0 -0
  165. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/location.py +0 -0
  166. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/predicates.py +0 -0
  167. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/print_string.py +0 -0
  168. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/printer.py +0 -0
  169. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/source.py +0 -0
  170. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/token_kind.py +0 -0
  171. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/language/visitor.py +0 -0
  172. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/py.typed +0 -0
  173. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/__init__.py +0 -0
  174. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/awaitable_or_value.py +0 -0
  175. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/cached_property.py +0 -0
  176. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/convert_case.py +0 -0
  177. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/did_you_mean.py +0 -0
  178. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_dict.py +0 -0
  179. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_error.py +0 -0
  180. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/frozen_list.py +0 -0
  181. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/group_by.py +0 -0
  182. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/identity_func.py +0 -0
  183. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/inspect.py +0 -0
  184. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/is_awaitable.py +0 -0
  185. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/is_iterable.py +0 -0
  186. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/merge_kwargs.py +0 -0
  187. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/natural_compare.py +0 -0
  188. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/path.py +0 -0
  189. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/print_path_list.py +0 -0
  190. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/simple_pub_sub.py +0 -0
  191. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/suggestion_list.py +0 -0
  192. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/pyutils/undefined.py +0 -0
  193. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/subscription/__init__.py +0 -0
  194. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/__init__.py +0 -0
  195. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/assert_name.py +0 -0
  196. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/definition.py +0 -0
  197. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/directives.py +0 -0
  198. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/scalars.py +0 -0
  199. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/type/schema.py +0 -0
  200. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/__init__.py +0 -0
  201. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/assert_valid_name.py +0 -0
  202. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/ast_from_value.py +0 -0
  203. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/ast_to_dict.py +0 -0
  204. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/build_ast_schema.py +0 -0
  205. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/build_client_schema.py +0 -0
  206. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/coerce_input_value.py +0 -0
  207. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/concat_ast.py +0 -0
  208. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/extend_schema.py +0 -0
  209. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/find_breaking_changes.py +0 -0
  210. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/get_operation_ast.py +0 -0
  211. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/get_operation_root_type.py +0 -0
  212. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/introspection_from_schema.py +0 -0
  213. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/print_schema.py +0 -0
  214. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/separate_operations.py +0 -0
  215. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/sort_value_node.py +0 -0
  216. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/strip_ignored_characters.py +0 -0
  217. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/type_from_ast.py +0 -0
  218. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/type_info.py +0 -0
  219. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/value_from_ast.py +0 -0
  220. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/utilities/value_from_ast_untyped.py +0 -0
  221. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/__init__.py +0 -0
  222. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/__init__.py +0 -0
  223. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/__init__.py +0 -0
  224. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/no_deprecated.py +0 -0
  225. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/custom/no_schema_introspection.py +0 -0
  226. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/executable_definitions.py +0 -0
  227. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/fields_on_correct_type.py +0 -0
  228. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/fragments_on_composite_types.py +0 -0
  229. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/known_argument_names.py +0 -0
  230. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/known_directives.py +0 -0
  231. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/known_fragment_names.py +0 -0
  232. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/known_type_names.py +0 -0
  233. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/lone_anonymous_operation.py +0 -0
  234. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/lone_schema_definition.py +0 -0
  235. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/max_introspection_depth_rule.py +0 -0
  236. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/no_fragment_cycles.py +0 -0
  237. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/no_undefined_variables.py +0 -0
  238. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/no_unused_fragments.py +0 -0
  239. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/no_unused_variables.py +0 -0
  240. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/possible_fragment_spreads.py +0 -0
  241. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/possible_type_extensions.py +0 -0
  242. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/provided_required_arguments.py +0 -0
  243. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/single_field_subscriptions.py +0 -0
  244. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_argument_definition_names.py +0 -0
  245. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_argument_names.py +0 -0
  246. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_directive_names.py +0 -0
  247. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_directives_per_location.py +0 -0
  248. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_enum_value_names.py +0 -0
  249. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_field_definition_names.py +0 -0
  250. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_fragment_names.py +0 -0
  251. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_input_field_names.py +0 -0
  252. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_operation_names.py +0 -0
  253. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_operation_types.py +0 -0
  254. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_type_names.py +0 -0
  255. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/unique_variable_names.py +0 -0
  256. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/values_of_correct_type.py +0 -0
  257. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/variables_are_input_types.py +0 -0
  258. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/rules/variables_in_allowed_position.py +0 -0
  259. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/specified_rules.py +0 -0
  260. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/validate.py +0 -0
  261. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql/validation/validation_context.py +0 -0
  262. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/SOURCES.txt +0 -0
  263. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/dependency_links.txt +0 -0
  264. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/not-zip-safe +0 -0
  265. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/requires.txt +0 -0
  266. {graphql_core-3.2.7 → graphql_core-3.2.9}/src/graphql_core.egg-info/top_level.txt +0 -0
  267. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/__init__.py +0 -0
  268. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/__init__.py +0 -0
  269. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_build_ast_schema.py +0 -0
  270. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_build_client_schema.py +0 -0
  271. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_introspection_from_schema.py +0 -0
  272. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_parser.py +0 -0
  273. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_repeated_fields.py +0 -0
  274. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_validate_gql.py +0 -0
  275. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_validate_sdl.py +0 -0
  276. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/benchmarks/test_visit.py +0 -0
  277. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/conftest.py +0 -0
  278. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/error/__init__.py +0 -0
  279. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/error/test_located_error.py +0 -0
  280. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/__init__.py +0 -0
  281. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_customize.py +0 -0
  282. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_execution_result.py +0 -0
  283. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_lists.py +0 -0
  284. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_map_async_iterator.py +0 -0
  285. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_middleware.py +0 -0
  286. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/execution/test_sync.py +0 -0
  287. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/fixtures/__init__.py +0 -0
  288. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/fixtures/github_schema.graphql +0 -0
  289. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/fixtures/github_schema.json +0 -0
  290. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/fixtures/kitchen_sink.graphql +0 -0
  291. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/fixtures/schema_kitchen_sink.graphql +0 -0
  292. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/__init__.py +0 -0
  293. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_ast.py +0 -0
  294. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_block_string.py +0 -0
  295. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_character_classes.py +0 -0
  296. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_location.py +0 -0
  297. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_predicates.py +0 -0
  298. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/language/test_print_string.py +0 -0
  299. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/__init__.py +0 -0
  300. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_cached_property.py +0 -0
  301. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_convert_case.py +0 -0
  302. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_did_you_mean.py +0 -0
  303. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_frozen_dict.py +0 -0
  304. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_frozen_error.py +0 -0
  305. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_frozen_list.py +0 -0
  306. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_group_by.py +0 -0
  307. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_identity_func.py +0 -0
  308. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_inspect.py +0 -0
  309. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_is_awaitable.py +0 -0
  310. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_is_iterable.py +0 -0
  311. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_merge_kwargs.py +0 -0
  312. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_natural_compare.py +0 -0
  313. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_path.py +0 -0
  314. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_print_path_list.py +0 -0
  315. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_simple_pub_sub.py +0 -0
  316. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_suggestion_list.py +0 -0
  317. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/pyutils/test_undefined.py +0 -0
  318. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/star_wars_data.py +0 -0
  319. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/star_wars_schema.py +0 -0
  320. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_docs.py +0 -0
  321. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_star_wars_query.py +0 -0
  322. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_star_wars_validation.py +0 -0
  323. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_user_registry.py +0 -0
  324. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/test_version.py +0 -0
  325. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/__init__.py +0 -0
  326. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_assert_name.py +0 -0
  327. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_custom_scalars.py +0 -0
  328. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_definition.py +0 -0
  329. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_directives.py +0 -0
  330. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_extensions.py +0 -0
  331. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_predicate.py +0 -0
  332. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/type/test_scalars.py +0 -0
  333. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/__init__.py +0 -0
  334. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_ast_from_value.py +0 -0
  335. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_coerce_input_value.py +0 -0
  336. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_sort_value_node.py +0 -0
  337. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_type_comparators.py +0 -0
  338. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_type_from_ast.py +0 -0
  339. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_value_from_ast.py +0 -0
  340. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utilities/test_value_from_ast_untyped.py +0 -0
  341. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utils/dedent.py +0 -0
  342. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utils/gen_fuzz_strings.py +0 -0
  343. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/utils/test_gen_fuzz_strings.py +0 -0
  344. {graphql_core-3.2.7 → graphql_core-3.2.9}/tests/validation/__init__.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 3.2.7
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.7
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.7 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.7 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
@@ -51,7 +51,7 @@ master_doc = "index"
51
51
 
52
52
  # General information about the project.
53
53
  project = "GraphQL-core 3"
54
- copyright = "2025, Christoph Zwerschke"
54
+ copyright = "2026, Christoph Zwerschke"
55
55
  author = "Christoph Zwerschke"
56
56
 
57
57
  # The version info for the project you're documenting, acts as replacement for
@@ -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.7"
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.
@@ -139,6 +139,8 @@ graphql_classes = {
139
139
  ignore_references = set(
140
140
  """
141
141
  GNT GT KT T VT
142
+ _asyncio.Future
143
+ asyncio.queues.Queue
142
144
  enum.Enum
143
145
  traceback
144
146
  types.TracebackType
@@ -146,6 +148,7 @@ EnterLeaveVisitor
146
148
  FormattedSourceLocation
147
149
  GraphQLAbstractType
148
150
  GraphQLErrorExtensions
151
+ GraphQLFormattedErrorExtensions
149
152
  GraphQLOutputType
150
153
  asyncio.events.AbstractEventLoop
151
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,4 +1,4 @@
1
- # This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand.
1
+ # This file is automatically @generated by Poetry 2.3.2 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.7"
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."""
@@ -87,5 +87,5 @@ disable = [
87
87
  ]
88
88
 
89
89
  [build-system]
90
- requires = ["poetry_core>=1,<3", "setuptools>=59,<81"]
90
+ requires = ["poetry_core>=1,<3", "setuptools>=59,<83"]
91
91
  build-backend = "poetry.core.masonry.api"
@@ -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,
@@ -5,7 +5,6 @@ from .ast import Location
5
5
  from .location import SourceLocation, get_location
6
6
  from .source import Source
7
7
 
8
-
9
8
  __all__ = ["print_location", "print_source_location"]
10
9
 
11
10
 
@@ -1,4 +1,4 @@
1
- from typing import Any, Tuple, Union
1
+ from typing import Any, Tuple, Type, Union
2
2
 
3
3
  __all__ = [
4
4
  "Description",
@@ -17,14 +17,14 @@ class Description:
17
17
  If you register(object), any object will be allowed as description.
18
18
  """
19
19
 
20
- bases: Union[type, Tuple[type, ...]] = str
20
+ bases: Union[Type[Any], Tuple[Type[Any], ...]] = str
21
21
 
22
22
  @classmethod
23
23
  def isinstance(cls, obj: Any) -> bool:
24
24
  return isinstance(obj, cls.bases)
25
25
 
26
26
  @classmethod
27
- def register(cls, base: type) -> None:
27
+ def register(cls, base: Type[Any]) -> None:
28
28
  """Register a class that shall be accepted as a description."""
29
29
  if not isinstance(base, type):
30
30
  raise TypeError("Only types can be registered.")
@@ -39,7 +39,7 @@ class Description:
39
39
  cls.bases += (base,)
40
40
 
41
41
  @classmethod
42
- def unregister(cls, base: type) -> None:
42
+ def unregister(cls, base: Type[Any]) -> None:
43
43
  """Unregister a class that shall no more be accepted as a description."""
44
44
  if not isinstance(base, type):
45
45
  raise TypeError("Only types can be unregistered.")
@@ -390,6 +390,9 @@ class TypeFields(GraphQLFieldMap):
390
390
  return type_.is_one_of if is_input_object_type(type_) else None
391
391
 
392
392
 
393
+ TypeResolvers = TypeFields # for backward compatibility
394
+
395
+
393
396
  _Type: GraphQLObjectType = GraphQLObjectType(
394
397
  name="__Type",
395
398
  description="The fundamental unit of any GraphQL Schema is the type."
@@ -154,6 +154,12 @@ class SchemaValidationContext:
154
154
  # Ensure they are named correctly.
155
155
  self.validate_name(directive)
156
156
 
157
+ if not directive.locations:
158
+ self.report_error(
159
+ f"Directive @{directive.name} must include 1 or more locations.",
160
+ directive.ast_node,
161
+ )
162
+
157
163
  # Ensure the arguments are valid.
158
164
  for arg_name, arg in directive.args.items():
159
165
  # Ensure they are named correctly.
@@ -583,7 +589,8 @@ class InputObjectCircularRefsValidator:
583
589
 
584
590
 
585
591
  def get_all_implements_interface_nodes(
586
- type_: Union[GraphQLObjectType, GraphQLInterfaceType], iface: GraphQLInterfaceType
592
+ type_: Union[GraphQLObjectType, GraphQLInterfaceType],
593
+ iface: Union[GraphQLObjectType, GraphQLInterfaceType],
587
594
  ) -> List[NamedTypeNode]:
588
595
  ast_node = type_.ast_node
589
596
  nodes = type_.extension_ast_nodes
@@ -51,14 +51,13 @@ def get_introspection_query(
51
51
  def input_deprecation(string: str) -> Optional[str]:
52
52
  return string if input_value_deprecation else ""
53
53
 
54
- return dedent(
55
- f"""
54
+ return dedent(f"""
56
55
  query IntrospectionQuery {{
57
56
  __schema {{
58
57
  {maybe_schema_description}
59
- queryType {{ name }}
60
- mutationType {{ name }}
61
- subscriptionType {{ name }}
58
+ queryType {{ name kind }}
59
+ mutationType {{ name kind }}
60
+ subscriptionType {{ name kind }}
62
61
  types {{
63
62
  ...FullType
64
63
  }}
@@ -158,8 +157,7 @@ def get_introspection_query(
158
157
  }}
159
158
  }}
160
159
  }}
161
- """
162
- )
160
+ """)
163
161
 
164
162
 
165
163
  # Unfortunately, the following type definitions are a bit simplistic
@@ -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
 
@@ -29,12 +29,12 @@ def is_equal_type(type_a: GraphQLType, type_b: GraphQLType) -> bool:
29
29
  # If either type is non-null, the other must also be non-null.
30
30
  if is_non_null_type(type_a) and is_non_null_type(type_b):
31
31
  # noinspection PyUnresolvedReferences
32
- return is_equal_type(type_a.of_type, type_b.of_type) # type:ignore
32
+ return is_equal_type(type_a.of_type, type_b.of_type) # type: ignore
33
33
 
34
34
  # If either type is a list, the other must also be a list.
35
35
  if is_list_type(type_a) and is_list_type(type_b):
36
36
  # noinspection PyUnresolvedReferences
37
- return is_equal_type(type_a.of_type, type_b.of_type) # type:ignore
37
+ return is_equal_type(type_a.of_type, type_b.of_type) # type: ignore
38
38
 
39
39
  # Otherwise the types are not equal.
40
40
  return False