unstale

pypi / graphql-core

graphql-core

What changed in graphql-core 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

26 breaking4 security2 deprecations25 new APIs and options9 performance5 behavior and defaults44 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.3.1 on npm

graphql-core 3115 changes

Breaking changes 26

  • Empty selection sets are now allowed by default, and this parse and validate option is deprecated; subscriptions selecting no field are rejected.

    3.3.2release notes

  • Only CRLF, LF, and CR count as line breaks in source locations and block strings, changing error locations at line starts.

    3.2.14, 3.3.2release notesrelease notes

  • Exhausting the budget now stops the whole validation with errors found so far and "Validation aborted."; the default is 500,000 units and return type wrapper comparisons count.

    3.3.2release notes

  • Validation stops with "Validation aborted." when work on shared fragments exceeds 50,000 units.

    3.2.14, 3.3.2release notesrelease notes

  • With experimental @stream, using it on either of two fields with the same response name now causes a conflict, even when directives are identical.

    3.3.2release notes

  • A GraphQLError created while handling an exception no longer adopts that exception's traceback; when raised, it gets its own traceback and the handled exception as context.

    3.2.14, 3.3.1release notesrelease notes

  • validation_aborted_error has been removed from graphql.validation.validate.

    3.3.1release notes

  • AST collection fields are tuples instead of lists.

    3.3.0release notes

  • AST nodes are frozen dataclasses, and all AST collection fields are tuples instead of lists.

    3.3.0release notes

  • create_source_event_stream() now takes a built Executor instead of the request arguments.

    3.3.0release notes

  • Functions and options deprecated in GraphQL.js 16 have been removed.

    3.3.0release notes

  • ExecutionContext has been renamed to Executor.

    3.3.0release notes

  • The execution_context_class parameter has been renamed to executor_class.

    3.3.0release notes

  • The parser option has been removed because directives on directive definitions and extensions are now part of the language.

    3.3.0release notes

  • A Python int that cannot be represented exactly as a float now raises a GraphQLError when coerced to Float.

    3.3.0release notes

  • Input coercion follows the specification more strictly, and default values are validated against their types.

    3.3.0release notes

  • GraphQL-core 3.3.0 supports Python 3.10 to 3.15; Python 3.7 to 3.9 are no longer supported.

    3.3.0release notes

  • Schema validation rejects input objects that cannot be given a finite value and reports circular input object references.

    3.3.0release notes

  • subscribe() stays synchronous when possible, like execute(), and raises a GraphQLError for non-subscription operations.

    3.3.0release notes

  • Non-integer numbers such as Decimal("2.5") produce a field error when serialized as Int instead of being truncated; non-number objects convertible to int still work.

    3.2.14release notes

  • When the overlapping-fields budget is exhausted, validation stops and returns errors found so far plus "Validation aborted."; MAX_FIELD_COMPARISONS is deprecated.

    3.2.14release notes

  • Documents, fragment chains, and variable values nested deeper than 200 levels are rejected with GraphQL errors instead of raising RecursionError in the request path.

    3.2.14release notes

  • Now subclasses GraphQLError, and validate() returns it as the last error when validation aborts, including on the error limit.

    3.2.14release notes

  • The parser's token limit now counts every consumed token, including skipped comments, so comment-padded documents can no longer bypass the limit.

    3.2.12release notessecurity advisory

  • The token_count of a parsed document now includes comments.

    3.2.12release notes

  • Directive locations are now required to be non-empty.

    3.2.8release notes

Security 4

  • Documents, fragment chains, and variable values nested deeper than 200 levels are rejected with GraphQL errors instead of raising RecursionError in the request path.

    3.3.2release notes

  • The token limit is now enforced while comments are skipped, rather than only after a whole run of comments has been read.

    3.2.14, 3.3.2release notesrelease notes

  • Each validation aborted after exceeding max_errors now creates a new error, preventing traceback growth and a memory-exhaustion denial of service.

    3.3.1release notessecurity advisory

  • Validation enforces a per-document field-comparison budget and aborts with a GraphQLError when exhausted. The default is 250,000 comparisons and can be adjusted by assigning to this constant.

    3.2.12release notessecurity advisory

Deprecations 2

  • Deprecated in favor of MAX_COMPLEXITY_BUDGET; changing it sets the budget to twice its value and issues a DeprecationWarning.

    3.2.14, 3.3.2release notesrelease notes

  • Deprecated in favor of the new parser limits without a warning; it is not an alias, continues counting comments, and is now accepted by build_schema.

    3.2.14, 3.3.2release notesrelease notes

New APIs and options 25

  • New parser option available to parse functions, build_schema, graphql, and graphql_sync.

    3.3.2release notes

  • New print_ast option that stops indentation and newline insertion at the specified depth; block strings retain their newlines.

    3.2.14, 3.3.2release notesrelease notes

  • New parser option for parse functions, build_schema, graphql, and graphql_sync; it works as in GraphQL.js and does not count comments.

    3.3.2release notes

  • New parser option available to parse functions, build_schema, graphql, and graphql_sync; its limit is measured in code points.

    3.2.14, 3.3.2release notesrelease notes

  • Aborting an operation raises this error with the partial result.

    3.3.0release notes

  • Operations can be aborted with an AbortSignal.

    3.3.0release notes

  • Directives on directive definitions and directive extensions are now part of the language.

    3.3.0release notes

  • Executors support hooks.

    3.3.0release notes

  • Adds incremental delivery with @defer and @stream, following the current spec proposal.

    3.3.0release notes

  • Adds experimental fragment arguments through a parser option.

    3.3.0release notes

  • This new function reports safe changes in addition to breaking and dangerous changes.

    3.3.0release notes

  • Use this new method to get the enclosing scalar inside list literals in custom scalar positions.

    3.3.0release notes

  • Bounds all work of OverlappingFieldsCanBeMergedRule, including return type wrapper comparisons, with a default budget of 500,000 units.

    3.2.14release notes

  • Adds an option to graphql, validate, execute, subscribe, and related functions that removes "Did you mean" from validation and input coercion errors.

    3.2.14release notes

  • Adds a parser option limiting comments for all parse functions and build_schema.

    3.2.14release notes

  • Adds a parser limit for lexical tokens to all parse functions and build_schema; it does not count comments.

    3.2.14release notes

  • Directive definitions can now have directives applied to them.

    3.2.11release notes

  • The introspection depth for ofType can now be configured.

    3.2.11release notes

  • Executable definitions, including variable definitions, can now have descriptions.

    3.2.10release notes

  • Adds the max_coercion_errors option.

    3.2.10release notes

  • Adds support for parsing and resolving schema coordinates.

    3.2.10release notes

  • Exposes token_count on DocumentNode.

    3.2.9release notes

  • Values can now be passed to GraphQLEnumType as a thunk.

    3.2.7release notes

  • OneOf Input Objects are implemented via the @oneOf directive.

    3.2.7release notes

  • Recommended validation rules are introduced.

    3.2.7release notes

Performance 9

  • Execution of fields without arguments is faster.

    3.3.2release notes

  • Its complexity budget now covers all rule work, addressing documents that could still take quadratic time.

    3.3.2release notes

  • Printing is 27 to 33 percent faster on CPython on normal documents and 20 to 29 percent faster on PyPy on small documents; deeply nested values no longer grow cubically in time.

    3.3.2release notes

  • Fields repeated in a selection set validate much faster, and errors with many locations no longer scan the source for each location.

    3.2.14, 3.3.2release notesrelease notes

  • Recreating schemas is faster, by about 23 percent on CPython.

    3.3.2release notes

  • SDL validation is faster.

    3.3.2release notes

  • A cheaper visit() makes validation 10 to 16 percent faster on CPython.

    3.3.2release notes

  • Coercing literal arguments is faster.

    3.3.1release notes

  • Printing is 57 to 62 percent faster on CPython on normal documents and 22 to 42 percent faster on PyPy.

    3.2.14release notes

Behavior and default changes 5

  • Conflict descriptions are abbreviated after 1000 characters, each side keeps at most 20 locations, and fragment spreads with large arguments use a shortened description.

    3.2.14, 3.3.2release notesrelease notes

  • Merging fragments with arguments is stricter when this experimental feature is enabled.

    3.3.2release notes

  • Reports errors when entering an operation or fragment, which can change error order.

    3.3.2release notes

  • Returns None inside list literals in custom scalar positions; use get_parent_input_type() for the enclosing scalar.

    3.3.0release notes

  • GraphQL-core 3 officially supports Python 3.8.

    3.0.0release notes

Fixes and other changes 44

  • With @defer and @stream, shared data is no longer lost when another owning fragment fails or delayed until a slower fragment finishes; nested failures are announced and completed once.

    3.3.2release notes

  • With @defer, a second labelled defer of the same fragment is retained, and a non-deferred spread is no longer skipped after a deferred parent.

    3.3.2release notes

  • Without check_sync, objects that are both iterable and async iterable are iterated synchronously instead of returning a coroutine in data.

    3.3.2release notes

  • Objects implementing __index__ can again be serialized as Float.

    3.3.2release notes

  • Conflicts between equal selection sets of fragments on different types are detected in documents parsed with no_location=True.

    3.2.14, 3.3.2release notesrelease notes

  • Objects implementing __index__ can again be serialized as Int.

    3.3.2release notes

  • Skips fragments already checked at the same or greater depth, preventing repeated walks and avoiding RecursionError for long fragment chains under an introspection field.

    3.2.14, 3.3.2release notesrelease notes

  • A nullable variable used inside a fragment on a non-null argument with a default is accepted again.

    3.3.2release notes

  • Formats block strings containing special characters or trailing newlines like GraphQL.js.

    3.2.14, 3.3.2release notesrelease notes

  • No longer misplaces the caret in minified documents at chunk boundaries or at the end of the document.

    3.3.2release notes

  • No longer raises IndexError for sources containing characters such as VT, FF, NEL, or U+2028.

    3.2.14, 3.3.2release notesrelease notes

  • Subfield memoization no longer risks reusing freed object ids, preventing a field from being resolved with another field's selection set.

    3.3.1release notes

  • Coerced defaults are memoized on each argument or input field, so shared default values are coerced for the correct type.

    3.3.1release notes

  • Decimal, Fraction, and NumPy scalar values can again be serialized as Int, Float, and Boolean; non-integer values are rejected as Int rather than truncated.

    3.3.1release notes

  • This release supports Python 3.10 to 3.15.

    3.3.1release notesrelease notes

  • Closing a subscription now closes the source iterator even when __aiter__ returns a different object.

    3.3.1release notes

  • An explicit Undefined variable value is treated as omitted, so the variable's default applies.

    3.3.0release notes

  • Returns None inside list literals in custom scalar positions; use get_parent_input_type() for the enclosing scalar.

    3.3.0release notes

  • No longer leaves is_type_of coroutines unawaited when a later is_type_of raises.

    3.2.14release notes

  • Error messages now use at most 100 levels of indentation.

    3.2.14release notes

  • Keeps the original error if closing a source without athrow also fails.

    3.2.14release notes

  • The nesting limit helps prevent stack exhaustion from crashing the interpreter on PyPy; deep recursion elsewhere can still encounter the issue.

    3.2.14release notes

  • This patch release supports Python 3.7 to 3.15.

    3.2.14release notes

  • The error message now correctly says "abstract type" instead of "composite type".

    3.2.13release notes

  • On Python 3.14, graphql_sync() and execute_sync() now report that execution failed to complete synchronously when called outside a running event loop.

    3.2.13release notes

  • Truncated string escape sequences now produce a GraphQLSyntaxError instead of an unhandled IndexError from parse() or graphql_sync().

    3.2.13release notes

  • Type hints now use uppercase values for the kind of types returned by introspection.

    3.2.13release notes

  • Python 3.15 is now supported.

    3.2.13release notes

  • Variable own-property checks are restored when converting values from an AST.

    3.2.11release notes

  • Unhandled exceptions during abstract type resolution are caught.

    3.2.10release notes

  • Sibling errors are no longer added after null propagation has occurred.

    3.2.10release notes

  • Validates that nullable variables are not passed to oneOf input object fields, as required by the spec.

    3.2.10release notes

  • Removes erroneous oneOf validation from the “values of correct type” rule.

    3.2.10release notes

  • Fixes incorrect validation errors when variable descriptions are used.

    3.2.10release notes

  • Fixes handling of empty selection sets.

    3.2.9release notes

  • Corrects the typing of extensions in GraphQLFormattedError.

    3.2.9release notes

  • Adds kind to the introspection query, mutation, and subscription root types.

    3.2.9release notes

  • Fixes missed field-merge conflicts hidden behind nested fragments.

    3.2.9release notes

  • Preserves schema and input-field properties, such as descriptions, when sorting.

    3.2.9release notes

  • introspection.TypeResolvers is available again as an alias for TypeFields, preserving backward compatibility.

    3.2.8release notes

  • Issues with pickled schemas are solved.

    3.2.7release notes

  • This patch release supports Python 3.7 to 3.14.

    3.2.7release notesrelease notesrelease notesrelease notesrelease notes

  • Sorting schemas now keeps extensions.

    3.2.7release notes

  • Fixes possible sort errors in build_response().

    3.0.0release notes