Stable release GraphQL-core v3.3.0, based on GraphQL.js v17.0.2.
This release supports Python 3.10 to 3.15.
This is the first stable release of GraphQL-core 3.3, which follows GraphQL.js 17. Since the minor version of GraphQL-core corresponds to the major version of GraphQL.js, this release contains breaking changes compared to GraphQL-core 3.2. Most of them come from GraphQL.js 17 and are described in the GraphQL.js v16 to v17 upgrade guide. If you need to stay compatible with GraphQL.js 16 or need support for Python 3.7 to 3.9, you can continue to use GraphQL-core 3.2.13.
Breaking changes compared to GraphQL-core 3.2.13:
- Python 3.7 to 3.9 are no longer supported.
- Functions and options that had been deprecated in GraphQL.js 16 have been removed.
- AST nodes are now frozen dataclasses, and all AST collection fields are tuples instead of lists.
ExecutionContexthas been renamed toExecutor, and the parameterexecution_context_classtoexecutor_class.subscribe()stays synchronous when possible, likeexecute(), and raises aGraphQLErrorfor non-subscription operations.create_source_event_stream()now takes a builtExecutor(seeExecutor.build()) instead of the request arguments.- A Python
intthat cannot be represented exactly as a float now raises aGraphQLErrorwhen coerced toFloat. - An explicit
Undefinedvariable value is treated as omitted, so the variable's default applies. - Input coercion follows the specification more strictly, and default values are validated against their types.
- Directives on directive definitions and directive extensions are now part of the language, so the parser option
experimental_directives_on_directive_definitionshas been removed. - Input objects that cannot be given a finite value are rejected by schema validation, with a new error message for circular input object references.
TypeInfo.get_input_type()andValidationContext.get_input_type()returnNoneinside list literals in custom scalar positions; use the newget_parent_input_type()for the enclosing scalar.
New features compared to GraphQL-core 3.2.13:
- Incremental delivery with
@deferand@streamviaexperimental_execute_incrementally(), following the current spec proposal. - Experimental fragment arguments (parser option
experimental_fragment_arguments). - Operations can be aborted with an
AbortSignal, raising anAbortedGraphQLExecutionErrorwith the partial result, and executors support hooks. - The new function
find_schema_changes()also reports safe changes, in addition to breaking and dangerous changes. - The API documentation has been updated to GraphQL.js 17; all examples in the docstrings are run as doctests.
Thanks to @jkimbo for sponsoring this project, to @Hama1cco for reporting a bug in the lexer, and to everybody who tested the pre-releases and reported issues.