Commit Graph

62 Commits

Author SHA1 Message Date
ariel1899
ef54b43ccc Fixing types 2020-04-20 10:50:03 -04:00
ariel1899
0feef9cc07 Change code with black 2020-04-16 17:12:18 -04:00
ariel1899
a644d03c5e Change code with black 2020-04-16 17:03:33 -04:00
ariel1899
96361fc6e7 Change types.py 2020-04-16 16:05:19 -04:00
ariel1899
f00ca9fca0 Change types.py, adding NonNull import 2020-04-16 15:55:35 -04:00
ariel1899
54fae91632 Change types.py 2020-04-16 15:49:04 -04:00
ariel1899
96110b05bb Revert "Fixing pylint"
This reverts commit e75c5845
2020-04-16 15:43:43 -04:00
ariel1899
e75c584559 Fixing pylint 2020-04-16 15:35:36 -04:00
ariel1899
d1f3c4d35a Fixing pylint 2020-04-16 15:08:04 -04:00
ariel1899
98bbf39123 Fixing bugs 2020-04-16 14:29:38 -04:00
ariel1899
f110f24681 Fixing imports 2020-04-16 14:24:15 -04:00
ariel1899
3379266154 Merging 2020-04-16 14:20:32 -04:00
ariel1899
31704a4ec6 Merge remote-tracking branch 'upstream/master' into upgrade-to-v2-9-1
# Conflicts:
#	graphene_django/fields.py
#	graphene_django/forms/mutation.py
#	graphene_django/forms/tests/test_mutation.py
#	graphene_django/tests/test_fields.py
#	graphene_django/tests/test_types.py
#	graphene_django/tests/test_utils.py
#	graphene_django/types.py
#	graphene_django/utils/utils.py
2020-04-16 14:16:05 -04:00
Gabor Markowski
7a14b77a41
fix a typo in the warning (#884) 2020-02-23 09:47:41 +00:00
Jonathan Kim
4e1b82a8d8
Check exclude fields correctly (#873) 2020-02-17 11:08:44 +00:00
Jonathan Kim
280b38f804
Only warn if a field doesn't exist on the Django model (#862)
* Only warn if a field doesn't exist on the Django model

Also don't warn if the field name matches a custom field.

* Expand warning messages
2020-02-07 09:55:38 +00:00
Vyacheslav Matyukhin
efe210f8ac Validate Meta.fields and Meta.exclude on DjangoObjectType (#842)
Resolves #840
2019-12-31 13:55:45 +00:00
Jonathan Kim
b7e4937775
Alias only_fields as fields and exclude_fields as exclude (#691)
* 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
2019-07-09 14:03:11 +01:00
Jonathan Kim
0988e0798a
Adds documentation to CAMELCASE_ERRORS setting (#689)
* Rename setting and add documentation

* Add examples

* Use `cls`
2019-07-08 22:22:08 +01:00
Konstantin Alekseev
e2e496f505 Apply camel case converter to field names in DRF errors (#514)
* Apply camel case converter to field names in DRF errors

* Implement recursive error camelize, add setting.
2019-06-25 09:40:29 +01:00
Jonathan Kim
612ba5a4ea
Add convert_choices_to_enum option on DjangoObjectType Meta class (#674)
* 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
2019-06-17 18:48:29 +01:00
Jonathan Kim
775d2e3523
Update travis and tox (#667)
* 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
2019-06-10 20:54:30 -07:00
Mel van Londen
a9a8d672e9
Merge pull request #600 from sierreis/filterset-class
Add support for filterset_class meta parameter
2019-06-09 16:48:46 -07:00
Andrew Bettke
a7ee042e9d Merge branch 'master' of https://github.com/graphql-python/graphene-django into fix/enhanced-proxy-model-support 2019-04-01 22:15:16 +13:00
Patrick Arminio
923d8282c7 Fix duplicated ErrorType declaration (#539)
* Add failing test case

* Fix duplicated ErrorType declaration
2019-03-31 12:01:43 +01:00
Jason Kraus
0a5020bee1 Get queryset (#528)
* first attempt at adding get_queryset

* add queryset_resolver to DjangoConnectionField and fix test failures

* cleanup get_queryset API to match proposal as close as possible

* pep8 fix: W293

* document get_queryset usage

* add test for when get_queryset is defined on DjangoObjectType
2019-03-31 12:01:17 +01:00
Andrew Bettke
980142dfcf Fix linting. 2019-03-27 17:24:13 +13:00
Andrew Bettke
36ac5626e9 Adds enhanced support for proxy models. 2019-03-27 17:09:25 +13:00
sierreis
4d905a46ac Fixed flake8 lint error 2019-03-25 10:03:54 -04:00
sierreis
5c191b9062 Add support for filterset_class meta parameter
* Allow for use of either filter_fields or filterset_class
* Add tests to check that the behavior is similar to filter_fields
* Add documentation to show how to make use of the parameter
2019-03-25 00:38:49 -04:00
Jonathan Kim
ce8fa7f9f2 Fix lint error 2019-03-09 22:39:04 +01:00
Olivia Rodriguez Valdes
7272d34950 Pass field_permissions as variable to __set_as_nullable__ method 2019-02-28 17:51:30 -05:00
Olivia Rodriguez Valdes
ef3cd81959 Reorder field_permissions 2019-02-28 17:21:26 -05:00
Olivia Rodriguez Valdes
1adb13dff8 Set function as unbound 2019-02-28 16:35:01 -05:00
Olivia Rodriguez Valdes
10d28ba5d0 Refactor DjangoObjectType 2019-02-28 15:30:36 -05:00
Olivia Rodriguez Valdes
142f5141ea Add permission to class 2019-02-19 13:31:19 -05:00
Olivia Rodriguez Valdes
715fbbe1dd Update permission to type 2019-02-19 13:02:06 -05:00
Olivia Rodriguez Valdes
7b86824afa Mixing DjangoObjectType and DjangoPermissionObjectType 2019-02-18 15:00:35 -05:00
Olivia Rodriguez Valdes
106d3e063d Add test to permission type 2019-01-07 08:25:19 -05:00
Olivia Rodriguez Valdes
0b34a215ad Set resolver as class attr 2019-01-07 07:46:00 -05:00
Olivia Rodriguez Valdes
d1391db45a Add permission type 2019-01-06 11:13:44 -05:00
Olivia Rodriguez Valdes
9e62c71d72 Add PermissionObjectType 2019-01-04 14:59:32 -05:00
Syrus Akbary
54ef52e1c6 Reformatted files using black 2018-07-19 16:52:24 -07:00
Syrus Akbary
c0edb0c927
Merge pull request #373 from jm2242/proxy-model-support
Basic Proxy model support
2018-02-11 13:46:13 -08:00
Jonathan Mares
0b103417f9 on_delete param where needed due to django 2 requirements
added support for querying a model with objects that may be a proxy model, fixed and added tests

a few style changes
2018-02-03 11:10:04 -05:00
mongkok
167d0a3964 Allow DjangoObjectType to have default _meta 2018-01-22 01:03:52 +05:30
Charles Haro
2a39f5d8ea Allow abstract Connection Class to DjangoObjectType
referred to as connection_class, it will instantiate the connection from the provided class or default to graphene.Connection if not supplied
2017-10-30 14:35:29 -07:00
Syrus Akbary
3d58148f03 Code adapted to new resolver API 2017-07-28 09:43:27 -07:00
Syrus Akbary
72529b70bb Fixed all tests and flake issues 2017-07-24 23:42:40 -07:00
Syrus Akbary
18db46e132 Removed Meta inheritance in favor of __init_subclass_with_meta__ 2017-07-24 22:27:26 -07:00