pypi graphql-core 3.3.0
v3.3.0

2 hours ago

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.
  • ExecutionContext has been renamed to Executor, and the parameter execution_context_class to executor_class.
  • subscribe() stays synchronous when possible, like execute(), and raises a GraphQLError for non-subscription operations. create_source_event_stream() now takes a built Executor (see Executor.build()) instead of the request arguments.
  • A Python int that cannot be represented exactly as a float now raises a GraphQLError when coerced to Float.
  • An explicit Undefined variable 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_definitions has 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() and ValidationContext.get_input_type() return None inside list literals in custom scalar positions; use the new get_parent_input_type() for the enclosing scalar.

New features compared to GraphQL-core 3.2.13:

  • Incremental delivery with @defer and @stream via experimental_execute_incrementally(), following the current spec proposal.
  • Experimental fragment arguments (parser option experimental_fragment_arguments).
  • Operations can be aborted with an AbortSignal, raising an AbortedGraphQLExecutionError with 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.

Don't miss a new graphql-core release

NewReleases is sending notifications on new releases.