* Add support for validation rules
* Enable customizing validate max_errors through settings
* Add tests for validation rules
* Add examples for validation rules
* Allow setting validation_rules in class def
* Add tests for validation_rules inherited from parent class
* Make tests for validation rules stricter
* adding optional_fields to enforce fields to be optional
* adding support for all
* adding unit tests
* Update graphene_django/rest_framework/mutation.py
Co-authored-by: Kien Dang <kiend@pm.me>
* linting
* linting
* add missing import
---------
Co-authored-by: Kien Dang <kiend@pm.me>
* Update Makefile
* django master requires at least python 3.10 now
* Allow customizing options passed to tox -e pre-commit
* py.test -> pytest
* Update ruff
* Fix E721
Do not compare types, use `isinstance()`
* Add back black to dev dependencies
* Pin black and ruff versions
* Use ruff in pre-commit
* Add pyupgrade
* Add isort
* Add bugbear
* Fix B015 Pointless comparison
* Fix B026
* B018 false positive
* Remove flake8 and isort config from setup.cfg
* Remove black and flake8 from dev dependencies
* Update black
* Show list of fixes applied with autofix on
* Fix typo
* Add C4 flake8-comprehensions
* Add ruff to dev dependencies
* Fix up
* Fix for issue #1385: Update mutation.py to serialize Enum objects into input values for ChoiceFields
* Update graphene_django/rest_framework/mutation.py
Co-authored-by: Steven DeMartini <1647130+sjdemartini@users.noreply.github.com>
---------
Co-authored-by: Steven DeMartini <1647130+sjdemartini@users.noreply.github.com>
* support reverse relationship for proxy models
* support multi table inheritence
* update query test for multi table inheritance
* remove debugger
* support local many to many in model inheritance
* format and lint
---------
Co-authored-by: Firas K <3097061+firaskafri@users.noreply.github.com>
* Add venv and .venv to gitignore since common venv paths
* Update cookbook-plain app requirements and local-dev notes
This also adds the DEFAULT_AUTO_FIELD to the app's Django settings to
resolve this warning when running `migrate`:
```
ingredients.Category: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the IngredientsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
```
* Fix#1417 graphiql explorer styles by including official CSS
Like in the official graphiql-plugin-explorer example here
6198646919/packages/graphiql-plugin-explorer/examples/index.html (L26-L29)
Resolves https://github.com/graphql-python/graphene-django/issues/1417
* Update GraphiQL version
---------
Co-authored-by: Steven DeMartini <sjdemartini@users.noreply.github.com>
Co-authored-by: Kien Dang <mail@kien.ai>
* Add DjangoFormInputObjectType to forms/types
InputObjectType derived class which gets fields from django form.
Type of fields with choices (converted to enum) is set to custom scalar
type (using Meta.object_type) to dynamically convert enum values back.
* Correct Reporter model a_choice field type according to CHOICES tuple
* Add tests for DjangoFormInputObjectType
* Add pyenv files to .gitignore
* Fix pyupgrade
* Fix tests
* Add docs
* Fix docs example
---------
Co-authored-by: Firas Kafri <3097061+firaskafri@users.noreply.github.com>
* change Sphinx version from 1.5.3 to 7.0.0
* change sphinx-autobuild version from 0.7.1 to 2021.3.14
* add pygments-graphql-lexer to docs/requirements.txt