Changelogs » Graphene-django




New features

* Add headers arg to GraphQLTestCase.query (827)
* Read csrftoken from DOM if no cookie is set in graphiql browser (826)
* Add support for partial updates when using Django Rest Framework serializers (731)
* Raise exceptions if fields defined in Meta.fields and Meta.exclude on DjangoObjectType don't exist (842)

Full changelog:




* Keep original queryset on DjangoFilterConnectionField (816)

Full changelog:



New features

* Support for Django v3 (793)


* Fix bug with django filter lookup expressions (805)
* Fix multiple bugs with the DjangoConnectionField not supporting annotations (796)

Full changelog:



Another release before v3. Fingers crossed we'll get v3 out soon!

New features

* Extend DjangoListField to use model queryset if none defined (732)
* Convert DRF ChoiceField to Enum (537)
* Adds variables arg to GraphQLTestCase.query (699)


* Handle isnull filters differently (753)
* Pin higher version of graphene for proper graphql-core version r… (768)

Full changelog:



Squeezing in another release before v3. Mostly bug fixes but also a change to the parts that are required in DjangoConnectionField and DjangoFilterConnectionField which might require a schema update.

New features

* Set converted Django connections to required (610)


* Fix choices enum: if field can be blank then it isn't required (714)
* Check for filters defined on base filterset classes (730)
* Make DjangoDebugContext wait for nested fields (591)

Full changelog:



Some great new features and lots of bugfixes in this release. A massive thanks to all the contributors that helped out! This release will probably be the last one before v3 (see

New features

* Add support for write_only fields in SerializerMutation (555)
* Enhanced support for proxy models (603)
* Add support for filterset_class meta parameter (600)
* Add watch option to graphql_schema management command (656)
* Add `convert_choices_to_enum` option on DjangoObjectType Meta class (674)
* Add option `CAMELCASE_ERRORS` to camel case field names in DRF errors (514 and 689)
* Mark content of ManyTo* relationships as NonNull (690)
* Alias `only_fields` as `fields` and `exclude_fields` as `exclude` (691)


* Stop enforcing csrf checks in GraphQLTestCase (658)
* Correctly propagate help_text as description for many-to-* relations (579)
* Fix Django manager check in DjangoConnectionField (which was preventing `prefetch_related` optimisations from working) (693)
* Remove duplicate ErrorType (701)
* Ensure correct filter types for DjangoFilterConnectionFields (682)
* Fix error of multiple inputs with the same type. When using same serializer. (530)

Full changelog:


Identical to 2.3.1 except we fixed the PyPi uploading.


Fixes one to one reverse relation resolution



* Fix import issue with `GraphQLTestCase`
* Stores the GraphiQL query in the URL fragment, rather than the query, so that sensitive data won't be logged to web server logs. 508
* Moves GraphiQL JS to a separate file to enable stricter Content Security Policies. 508
* Fix parameter order 526
* Provide a way to dump schema to stdout 512
* Removed old Django compatibility code 619
* Added staticfiles to MANIFESTS.IN 601
* Update GraphiQL to use 0.13.0 646
* Change `__debug` to `_debug` to avoid conflicts 646

Documentation improvements

* Django debug types 513
* Updated cookbook examples to be compatible with Django 2.1
* Improved testing documentation 608
* Vastly improved documentation throughout.


This version adds official support for Django 2.1 (and `django_filter` latest version)

* Exclude `id` from mutations if is in `exclude_fields` 21bad6105c5f5def317fd16c908b85dc43dd7b5b
* Added compatibility with `django_filter>=2` in Python 3 e45708b44e15db3c70d68b912823dd9efc5b8339
* Removed official support for `Django<1.11` (only `1.11`, `2.0`, `2.1` and upwards will be supported)

* Improved authorization docs f6dba3942c104d1b37479ffa417b88ffaf003349
* Reword abstract to mixin for reusable fields 1ba9652f382ba99cd40a534167976ee64d0ad29b


* Reformatted files using `black`
* Pin `django-filter` version to < 2

* Fixed links
* Make examples diff more clear



* Fixed non-deterministic (that causes dependency issues when using Python 3 and Django 2)

Thanks sciyoshi for reporting the issue in  :)


This is the first RC after almost 8 months from the previous release, apologizes for the long delay.
This Release Candidate should be good to start using, please let me know if you find any issues before doing the stable release `2.1.0`.

Thanks to all the contributors for pushing the project forward: grantmcconnaughey pizzapanther jkimbo patrick9 faassen spockNinja BossGrand mongkok mbarrientos eyal0803 jm2242 danyx23 pjdelport 🎉

* Update requirements to use `Graphene>=2.1` and `graphql-core>=2.1rc1`
* Added support for pluggable backends 449
* Added support for `models.FilePathField`
* Django Rest Framework serializer fixes
* Inheritance support for GraphQLView
* Support ListSerializer fields in SerializerMutation
* Fixes `rel` available in  `ForeignKey` 400
* GraphQLView, Fix qfactor rankings for `HTTP-ACCEPT` 340
* Update GraphiQL 356
* Added Proxy Model support 373
* Handle conversion to `Date`, `DateTime` and `Time` types properly 335 368
* Improve ErrorType in DRF mutation errors 382
* Make it compatible with Django 2.0.1 377
* Remove Django 1.7 shims 339
* Fix build tests 338
* Avoid `Enum` duplication for choice fields 156
* Fixed batch endpoint issue 278
* Pass context object to `Filterset` queryset 232
* Fix `select_related` with filtering 224
* Allow `DjangoObjectType` to use an Abstract connection class 313
* Fix `DjangoFilterConnectionField` to ignore annotations, `.reverse` 315

* Updated docs template
* Updated cookbook tutorial
* Fixed bad documented `SerializerMutation`
* Fix context-dependent filtering example in docs
* Fixed authorization docs
* Update example project doc link 359
* Updated function signature fix
* Fix drop usage of `AbstractType` in docs
* Fixed docs typos


To come soon!



* Fix node filtering 2d1ab4b92a40df33c6ca80e728bab8819847e5ec
* Fix field choice collision 03f3fbef22a85a966e8b9c2e4f6f8749a93dabf5
* Fix reverse fields name eb02f8781c2b0f140a1811df07fd07fdcf1feac2
* Allow recursive nodes acff3d59dbcb857b7be41a4d87042f06bc0d39fe
* Accept connections for DjangoFilterConnectionField a599e4cb3eded1d3f2b56ba4a2a5ed1e1c16c8e0
* Allow nodes to skip the registry 0ec8d2c828f84d987ef3f6c1f61be322e3445af2
* Improved support for GraphQL batch c8179de895363051ab83f2acaf75bea31a9a55d2 1139507a149451cca79004fec932532c9dc6a6ea
* Simplified `DjangoConnectionField` logic 4cc46736bf7297d3f927115daedd1c332c7a38ef
* Avoid redundant filtering in non nested nodes 87f0c3398397c17e5a92d8f048666c4506d2705b
* Add tests for `only`/`exclude_fields` options in `DjangoObjectType` 46048cd21844366e3c0b2b58e45a2fe135ae0b9a
* Remove `django_graphiql` requirement 005bb7fe04db5614b8327138d11a5d7169a65ab2
* Fix filter and resolver on connection fields 3803e9a762c1be0bf48373f497889efda9bc2a63
* Added `RELAY_CONNECTION_MAX_LIMIT` and `RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST` settings 46a1ddedd8af3a73bac5615355e0f92375420ee9


* Add login required example 441dde47819954e09c7bb731e387fec050fe9f5d
* Added documentations for limiting field access using exclude_fields f3d9cbcd1448fd39bd4ecbdc365138c8af39f4dd
* Add introduction tutorial 488992b0473e098999a337296e0983cf10916dc7
* Small fixes (spelling: fd91f783660aeab122a2cbd2c08b89093c7f955d)
* Improved docs for running tests locally 28db2c05061e0870951cf1cc93963ac6ad0bcf1b


- Added TimeField support 66

- Improved docs and cookbook example


- Fixed JSONField import only in Django 1.9+. 40 d8567f1c58cb87527fa55d9dc9ace9d7ac444047
- Updated support for `django-filter` >= 1.0.0

- Removed `filter_order_by` as option in `DjangoObjectType` Meta. Caused by deprecation of `order_by` attribute in `django-filter` >= 1.0.0 65


- Fix Primary Key Model retrieval as IDs 1bf5d602ce508af9e6179b0a0dedd506924b77fe
- Added `DurationField` and improved `UUIDField` conversion 8136223bb1061da92a05031260d356388c2149a7
- Added support for `SimpleLazyObject` d73f4aa23581d7604cd92a80e8890ad490170094
- Use filter label as argument description 60bcc0beefbb1b2a97f211d3f8fb15f79f0c6395
- Display variables as JSON in GraphiQL 87422a0e40b41ba104ab0bdcc4bb27c348f17e11
- Fix UnboundLocalError exceptions 6bd89f2c78caae00cf8e0fcb9ba3f1b3dfc5fc03
- Don't use fields with `related_name` ending in `+` bb0b4fa76651ec0dd809bceadfb463596049458c
- Add pytest runner d5951b84775f09b606f36b6ea463969440c2aedc
- Fix missing `operation_name` warning 31fdb5a34c800ca2308899279d15987ae6120666

Breaking changes
- Fix choice enums 3a9ffba56086691360dc68a6d93d3e36e30ea01a. This change could break the clients as the enum value names calculated from the field choices are now retrieved from the choice name instead of description.

- Fixed docs to include ObjectType in the Query d1f28633744d61aa955dc862c5cd2c29d678695c
- Fix GraphQL url 06e408124bef21d845b21047aa5bb5b19f6f96e5
- Improved cookbook docs efc8fd6633ca700885ff684574759dc4b383e4bb
- Explain alternative way for using GraphQL view with schema dd07cb1f6cbe9a7b4e119ceea1caf9de2ce13b48