Graphene

Latest version: v3.4.3

Safety actively analyzes 723217 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 11

3.4.3

What's Changed
A proper error will now be raised when invalid UUIDs are passed as input variables.
* Do not raise AttributeError when parsing non-string UUIDs by phihag in https://github.com/graphql-python/graphene/pull/1582

New Contributors
* phihag made their first contribution in https://github.com/graphql-python/graphene/pull/1582

**Full Changelog**: https://github.com/graphql-python/graphene/compare/v3.4.2...v3.4.3

3.4.2

What's Changed
Graphene now supports overriding the Union options!
* Overridable Union meta by that-one-arab in https://github.com/graphql-python/graphene/pull/1583

New Contributors
* that-one-arab made their first contribution in https://github.com/graphql-python/graphene/pull/1583

**Full Changelog**: https://github.com/graphql-python/graphene/compare/v3.4.1...v3.4.2

3.4.1

What's Changed
This release brings a regression fix for `DateTime` parsing in python versions before 3.11, caused by the removal of `aniso8601`. The issue was introduced in `3.4.0`.
If you are using the `DateTime` scalar together with a `Python <= 3.10`, please update Graphene to this version.

* fix: use dateutil-parse for < 3.11 support by erikwrede in https://github.com/graphql-python/graphene/pull/1581


**Full Changelog**: https://github.com/graphql-python/graphene/compare/v3.4.0...v3.4.1

3.4.0

What's Changed
This release brings housekeeping changes and support for Python 3.13. Thanks to all contributors who made this release happen, and special thanks to dulmandakh for bringing our CI up to modern standards.

Full PR Changelist
* remove pytz by wongcht in https://github.com/graphql-python/graphene/pull/1520
* docs: update docstring for `type` arg of `Field` by andrewswait in https://github.com/graphql-python/graphene/pull/1527
* CI: bump GH actions by dulmandakh in https://github.com/graphql-python/graphene/pull/1544
* remove polyfill for dataclasses by dulmandakh in https://github.com/graphql-python/graphene/pull/1545
* Remove Python 3.7 by dulmandakh in https://github.com/graphql-python/graphene/pull/1543
* bump pytest to 7 by dulmandakh in https://github.com/graphql-python/graphene/pull/1546
* CI: fix deprecation warning by dulmandakh in https://github.com/graphql-python/graphene/pull/1551
* Python 3.12 by dulmandakh in https://github.com/graphql-python/graphene/pull/1550
* remove aniso8601, mock, iso8601 by dulmandakh in https://github.com/graphql-python/graphene/pull/1548
* pytest: Don't use nose like syntax in graphene/relay/tests/test_custom_global_id.py (1539) by tijuca in https://github.com/graphql-python/graphene/pull/1540
* docs: create security.md by erikwrede in https://github.com/graphql-python/graphene/pull/1554
* remove Python 2 by dulmandakh in https://github.com/graphql-python/graphene/pull/1547
* fix lint error in SECURITY.md by dulmandakh in https://github.com/graphql-python/graphene/pull/1556
* support python 3.13 by dulmandakh in https://github.com/graphql-python/graphene/pull/1561
* remove README.rst, leave only README.md by dulmandakh in https://github.com/graphql-python/graphene/pull/1559
* pytest 8 by dulmandakh in https://github.com/graphql-python/graphene/pull/1549
* CI: format check using Ruff by dulmandakh in https://github.com/graphql-python/graphene/pull/1557
* Lint using Ruff by dulmandakh in https://github.com/graphql-python/graphene/pull/1563
* CI: fix tests on Python 3.13 by dulmandakh in https://github.com/graphql-python/graphene/pull/1562
* Actually run the tests in python 3.12 and 3.13 and remove `snapshottest` dependency by PoByBolek in https://github.com/graphql-python/graphene/pull/1572
* refactor: replace deprecated decorator with upcoming native support (via typing-extensions), bump mypy by erikwrede in https://github.com/graphql-python/graphene/pull/1578
* bump pre-commit to 3.7 by dulmandakh in https://github.com/graphql-python/graphene/pull/1568
* lint: use ruff pre commit hook by dulmandakh in https://github.com/graphql-python/graphene/pull/1566
* CI: build package by dulmandakh in https://github.com/graphql-python/graphene/pull/1564
* CI: bump upload-artifact and codecov actions by dulmandakh in https://github.com/graphql-python/graphene/pull/1567

New Contributors
* wongcht made their first contribution in https://github.com/graphql-python/graphene/pull/1520
* andrewswait made their first contribution in https://github.com/graphql-python/graphene/pull/1527
* tijuca made their first contribution in https://github.com/graphql-python/graphene/pull/1540
* PoByBolek made their first contribution in https://github.com/graphql-python/graphene/pull/1572

**Full Changelog**: https://github.com/graphql-python/graphene/compare/v3.3.0...v3.4.0

3.3.0

This release brings two new features and several fixes and semantic upgrades due to new Python features. Thanks to everyone that contributed! 😊

Default value for InputObjectTypes
⚠️⚠️**ACTION REQUIRED**⚠️⚠️
In GraphQL, inputs can have fields which are optional. Currently, if those fields are not specified in the query, they are passed to the python inputs as `None`. This renders them indistinguishable from fields that are actually passed to the query with a value of `null`. While the alternative would be to check the definition via `"key" in input`, it is more accessible to mark these fields as explicitly `UNDEFINED`.
[This PR](https://github.com/graphql-python/graphene/pull/1506) adds a new global override, which allows unspecified fields to be set to `graphql.UNDEFINED`. In the future, the default Value will be set to `UNDEFINED`, making this a soft migration and deprecation of the previous situation.

**This is a soft migration. Long-Term, the Input Objects will ALWAYS contain the value `UNDEFINED`** Make sure your code supports these cases in `None` checks. After the default has been set to `UNDEFINED`, you will still be able to switch back to `None` for the foreseeable future.


Strict connection types support in Relay

Custom Relay connection classes can now be made `NonNull` using the `strict_types` option on the connection meta.

Using this example
python
class MyObjectConnection(Connection):
class Meta:
node = MyObject
strict_types = True


will change from
graphql
type MyObjectConnection {
edges: [MyObjectEdge]
}


to
graphql
type MyObjectConnection {
edges: [MyObjectEdge!]!
}



Caveats

We want to make sure you're informed about using NonNull relay connections. While they are a great way to get rid of some null checks in typed frontends, it's important to be mindful of error handling with these connections. When working with NonNull connections, it's crucial to remember that if a requested field or edge is not available or the resolver throws an error, the error will bubble up to the next nullable parent field, which is oftentimes the root node. That way, you cannot handle partial results in case of partial errors anymore. In a nullable connection, only the nullable fields will be set to null and the error will not bubble up.

To address this, we recommend considering waiting for the future release of client-controlled nullability for cases where certain connections might be nullable. By opting for client-controlled nullability, you gain more control over error handling, enabling you to handle potential null values more gracefully and enhance the overall user experience. Read more about client controlled nullability here: https://github.com/graphql/graphql-spec/issues/867

What's Changed
* Default enum description to "An enumeration." by firaskafri in https://github.com/graphql-python/graphene/pull/1502
* Allow the user to change InputObjectType's default value on non-specified inputs to a sentinel value by flipbit03 in https://github.com/graphql-python/graphene/pull/1506
* 881: Corrected enum metaclass to fix pickle.dumps() by senseysensor in https://github.com/graphql-python/graphene/pull/1495
* chore: Use `typing.TYPE_CHECKING` instead of MYPY by rapsealk in https://github.com/graphql-python/graphene/pull/1503
* test: print schema with InputObjectType with DateTime field with default_value (1293) by ransomw in https://github.com/graphql-python/graphene/pull/1513
* docs: add get_human function by conao3 in https://github.com/graphql-python/graphene/pull/1380
* CI: drop python 3.6 by dulmandakh in https://github.com/graphql-python/graphene/pull/1507
* types: add option for strict connection types by shrouxm in https://github.com/graphql-python/graphene/pull/1504

New Contributors
* firaskafri made their first contribution in https://github.com/graphql-python/graphene/pull/1502
* senseysensor made their first contribution in https://github.com/graphql-python/graphene/pull/1495
* rapsealk made their first contribution in https://github.com/graphql-python/graphene/pull/1503
* ransomw made their first contribution in https://github.com/graphql-python/graphene/pull/1513
* dulmandakh made their first contribution in https://github.com/graphql-python/graphene/pull/1507
* shrouxm made their first contribution in https://github.com/graphql-python/graphene/pull/1504

**Full Changelog**: https://github.com/graphql-python/graphene/compare/v3.2.2...v3.3.0

3.2.2

This release provides some internal refactoring to the relay types to improve support for adding custom fields to them.

Page 1 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.