* Fix issue #1055
* Fix if to elif
* Use self.stdout.write instead of print when printing graphql schema
Co-authored-by: leonardo arroyo <[contato@leonardoarroyo.com](mailto:contato@leonardoarroyo.com)>
* fix( DjangoListField ): test that default functionality should resolve/call queryset at view time, first attempt at solution
* fix( DjangoListField ): DjangoListField defines get_manager just like DjangoConnectionField for a better variable name default_manager instead of default_queryset
* fix: apply specific black formatting
In general I welcome reviews even from non-maintainers to build confidence. I haven't seen any objections and this has sat with approval for a week so I am going to go ahead and merge.
* Add a default msg to show the response content.
This seems like an issue with using assertResponseNoErrors and assertResponseHasErrors
Which doesn't include any errors specific to the response and currently just shows.
```python
self.assertNotIn("errors", list(content.keys()))
AssertionError: 'errors' unexpectedly found in ['errors', 'data']
```
* Update testing.py
* Add integrity checks for GraphiQL CDN resources
Also fixes an erroneous assignment preventing a setting from getting to
the UI.
* Pass SRIs and new versions to the template
* Update hashes
* Use SRI-stable artifacts for GraphiQL resources
* Reset the global registry after each test (teardown)
* Create a settings fixtures that returns graphene_settings and resets
the graphene_settings after use (teardown)
* Convert test_mutation tests from unittests.TestCase to pytest
* Convert test_mutation PetType to a pet_type fixtures that reregisters
the type
* Remove Python 2 support
* Upgrade Python & Django versions
* Remove unsupported Django versions
* Remove unsupported Python versions
* Add Python 3.8
* Drop support for django-filter < 2
* Update LoginRequiredMixin doc link
* Remove redundant import
* Resolve RemovedInDjango40Warning warnings
* gql/graphene-django/graphene_django/tests/test_converter.py:175:
RemovedInDjango40Warning: django.utils.translation.ugettext_lazy() is
deprecated in favor of django.utils.translation.gettext_lazy().
* graphene-django/graphene_django/utils/utils.py:28:
RemovedInDjango40Warning: force_text() is deprecated in favor of
force_str().
* No need to use unicode strings with Python3
* Remove singledispatch dependency
singledispatch is inluded with Python >= 3.4, no need for external
package.
* Add new setting to create unique enum names
* Add specific tests for name generation
* Add schema test
* Rename settings field
* Rename setting
* Add custom function setting
* Add documentation
* Use format instead of f strings
* Update graphene_django/converter.py
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
* Fix tests
* Update docs
* Import function through import_string function
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
* use `to_represenation` in favor of `get_attribute`
* fix datetime type does get converted to a string
to_representation will convert the datetime field into a string representation. However the to_representation on the method field will only call its underlying method.
* fix add missing import
* apply black formatter
* add test for serializer method field
* apply black format
* improve backward compatibility
by using date's class contructor instead of fromisostring
* apply black format
* fix black format issue
* don't replace <body>
* Update graphene_django/templates/graphene/graphiql.html
Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>
* Fix editor styling and initialisation
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
* Add headers arg to GraphQLTestCase.query
* fix headers NoneType case in GraphQLTestCase.query
* Run format
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
* Keep original queryset on DjangoFilterConnectionField
The PR #796 broke DjangoFilterConnectionField making it always get the
raw queryset from the model to apply the filters in it.
This makes sure that the DjangoObjectType's .get_queryset is called,
keeping any filtering it might have made.
* Add regression test
* replace merge_queryset with resolve_queryset pattern
* skip double limit test
* Update graphene_django/fields.py
Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>
* yank skipped test
* fix bad variable ref
* add test for annotations
* add test for using queryset with django filters
* document ththat one should use defer instead of values with queysets and DjangoObjectTypes
* django-filter: resolve field along with lookup expression to properly resolve field
* bring back django-filter with method test
* remove dangling comment
* refactor based on better knowledge of django-filters
* convert DRF ChoiceField to Enum, also impacts FilePathField
* Pep8 fixes
* DRF multiple choices field converts to list of enum
* apply black formatting
Graphiql has a history tool that allows you to save and label favourites, but this version has a bug (fixed https://github.com/graphql/graphiql/issues/750). This change upgrades to the latest version.
* Make DjangoDebugContext wait for nested fields
This commit makes DjangoDebugContext wait for all field's promises,
even for fields that only started their resolvers after __debug was
resolved.
Fixes#293.
* Run format
* Check for filters defined on base filterset classes
* Make python2.7 compatible and run black
* Add filter method and use filter in test
* Check article headline and reformat
* Create new fields and exclude options that are aliased to exclude_fields and only_fields
* Update docs
* Add some checking around fields and exclude definitions
* Add all fields option
* Update docs to include `__all__` option
* Actual order of fields is not stable
* Update docs/queries.rst
Co-Authored-By: Semyon Pupkov <semen.pupkov@gmail.com>
* Fix example code
* Format code
* Start raising PendingDeprecationWarnings for using only_fields and exclude_fields
* Update tests
* Get form field from Django model before defaulting to django-filter
* Add test
* Cleanup some flake8 warnings and pytest warnings
* Run isort and add black compatible config
* Include setup.py in black formatting
* Add new flake8 plugins and update errors to look for
* Fix duplicate test name
* Don't use mutable data structure
* Install all dev dependencies for flake8 and black tox envs
* Add convert_choices_to_enum meta option
* Add tests
* Run black
* Update documentation
* Add link to Django choices documentation
* Add test and documentation note
That setting to an empty list is the same as setting the value as False
* Fix Django warning in tests
* rst is not markdown
* Update travis and tox
* Use xenial distribution
* Don't install coveralls twice
* Add black and flake8 tox commands
* Remove Python 3.5 test for Django master
* Fix indent
* Ignore migrations
* Remove black for now
* Run black formatting (#668)
* Run black format
* Update makefile
* Add black to travis build