* 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
* Remove redundant call to validate
The call to `validate` in the django view is redundant with the validation call in graphql-core.
* Remove whitespace
---------
Co-authored-by: Firas K <3097061+firaskafri@users.noreply.github.com>
* Use Python 3.10 for deployments on PyPi
* Update gh-action-pypi-publish version
* Update python version
* Update checkout and setup-python versions
* Upgrade dev dependencies
* fromat examples and few files to follow black new version
* Upgrade pytest version
---------
Co-authored-by: Firas Kafri <firaskafri@Firass-MacBook-Pro-2.local>
pre-commit is currently configured nicely but hasn't been part of the
Makefile setup and isn't mentioned in the contributing notes. This
change makes it so that pre-commit is installed as a part of the dev
setup, whereas before it had to be manually installed.
This test passes after reverting the `CustomField` resolver change
introduced in
https://github.com/graphql-python/graphene-django/pull/1315, but fails
with that resolver code present. For instance, adding back the resolver
code gives a test failure showing:
```
Failed: Expected to perform 2 queries but 11 were done
```
This should ensure there aren't regressions that prevent
query-optimization in the future.
Currently the relay cookbook's readme has a link to the plain tutorial
page. The plain cookbook readme also instructs the user to change
directory into the directory for the relay example. This change fixes
both issues.
Also changed the title for the relay example to specify that it uses
relay.