Jason Kraus
c049ab7470
WIP: Merge master into v3 ( #1086 )
...
* merge master into v3
* fix order_by snake casing by checking if value is None, switch executor to execution_context_class since schema.execute no longer supports executor
* fix linting by removing duplicate defintion and test of convert_form_field_to_string_list
2020-12-30 15:37:57 -08:00
Jonathan Kim
da9f41c295
Rename get_resolver -> wrap_resolve and fix tests
2020-08-06 20:45:30 +01:00
Jonathan Kim
6cfcddac5a
Merge branch 'master' into v3
2020-08-06 20:35:08 +01:00
Thiago Bellini Ribeiro
d50955a173
Do not break when after is greater than list_length ( #999 )
2020-07-09 18:01:22 +01:00
Jonathan Kim
965ebdee13
Merge branch 'master' into v3
2020-06-27 11:14:09 +01:00
Jonathan Kim
3026181b28
Set first amount to max limit if not set ( #993 )
2020-06-25 15:10:56 +01:00
Paul Craciunoiu
3c229b619e
Fix hasNextPage - revert to count. Fix after ( #986 )
...
Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
2020-06-25 13:00:24 +01:00
Paul Craciunoiu
c00203499b
DjangoConnectionField slice: use max_limit first, if set ( #965 )
2020-06-06 19:00:21 +01:00
Jonathan Kim
9b41472922
Merge branch 'master' into v3
2020-05-09 12:50:39 +01:00
Jonathan Kim
b4e34a5794
Improve DjangoListField ( #929 )
2020-05-09 12:28:03 +01:00
Jean-Louis Fuchs
10d22de98e
graphql 3.0 and graphene 3.0 final rebase ( #951 )
2020-05-09 12:13:47 +01:00
Ülgen Sarıkavak
dd0d6ef28f
Python 3 ( #904 )
...
* 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.
2020-04-06 13:21:07 +01:00
Jonathan Kim
c8a56f8857
Allow string references in DjangoListField ( #885 )
...
* Allow passing string references to DjangoListField
* Refactor logic to work with string imports
2020-03-13 10:05:35 +00:00
Jason Kraus
a818ec9017
replace merge_queryset with resolve_queryset pattern ( #796 )
...
* 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
2019-11-28 10:49:37 +00:00
Jonathan Kim
fea9b5b194
Extend DjangoListField to use model queryset if none defined ( #732 )
...
* Fix model property
* Only allow DjangoObjectTypes to DjangoListField
* Resolve model queryset by default
* Add some more tests to check behaviour
2019-09-17 09:14:18 -07:00
Jonathan Kim
40ae7e53ec
Fix manager check in DjangoConnectionField ( #693 )
...
* Fix default manager check
* Add test
2019-07-02 19:37:50 +01:00
Jonathan Kim
54cc6a4b13
Enforce NonNull for returned related Sets and their content ( #690 )
...
* Enforce NonNull for returned related Sets and their content. https://github.com/graphql-python/graphene-django/issues/448
* Run format.
* Remove duplicate assertion
2019-06-25 16:30:30 +01:00
Paul Hallett
0d178b38fb
Merge pull request #609 from acu/fix-connection-field-required
...
Fix passing required=True to DjangoConnectionField
2019-05-06 12:01:12 +01:00
Alexandre Kirszenberg
b49d315a39
4 spaces
2019-05-01 15:49:54 +02: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
Alexandre Kirszenberg
8beadc759f
Correctly propagate NonNull to inner connection type
2019-03-30 19:43:11 +01:00
Syrus Akbary
54ef52e1c6
Reformatted files using black
2018-07-19 16:52:24 -07:00
Daniel Bachler
34f5978446
Move distinct check code to merge_querysets again
2018-02-28 17:52:27 +01:00
Daniel Bachler
e05fbcc1b3
Fix failing unit test by handling cases where a connection is resolved involving a query with inner join and distinct that is then filtered and would be combined with a filtered queryset that is not distinct.
2018-02-28 14:41:47 +01:00
=
de59d26968
Test: erro if last is greater than max - plus fix wrong variable
2017-12-12 12:24:11 -05:00
Syrus Akbary
3d58148f03
Code adapted to new resolver API
2017-07-28 09:43:27 -07:00
Syrus Akbary
64118790ff
Fixed list resolver
2017-07-26 23:41:34 -07:00
Syrus Akbary
6ceb07c51c
Improved resolver consistency
2017-07-26 23:36:08 -07:00
Syrus Akbary
72529b70bb
Fixed all tests and flake issues
2017-07-24 23:42:40 -07:00
Syrus Akbary
48bcccdac2
Improved integration with Graphene 2.0
2017-07-24 22:27:50 -07:00
Syrus Akbary
7263485225
Merge pull request #194 from dvdmgl/173-annotation-bug
...
Fix graphene 1.3 annotation bug
2017-06-28 20:53:01 -07:00
David Miguel
b3c761b1c8
Fix graphene 1.3 annotation bug
...
Issue #173
2017-06-06 19:19:29 +01:00
arianon@openmailbox.org
bfcac1d48c
Use Promise.then instead of Promise.get on DjangoConnectionField
2017-05-19 19:33:00 -04:00
arianon@openmailbox.org
4350582c52
Support Connections created from Promises
2017-05-19 19:12:28 -04:00
Syrus Akbary
46a1ddedd8
Added RELAY_CONNECTION_MAX_LIMIT and RELAY_CONNECTION_ENFORCE_FIRST_OR_LAST settings
...
Relay connections will be limited to 100 records by default.
2017-04-15 02:15:17 -07:00
Syrus Akbary
5833cb83be
Fixed filterset limit issue
2017-04-15 01:00:02 -07:00
Niall
fda876fdc2
Long-winded intersection using sets
2017-03-06 19:41:45 +00:00
Niall
69457cffdf
Attempt fix. Breaks tests
2017-03-06 18:13:40 +00:00
Niall
7085437a12
Fix filtering with a resolver and DjangoFilter filter.
2017-03-05 17:13:09 +00:00
Syrus Akbary
87f0c33983
Merge pull request #118 from gamingexperience/fix/node-filtery-efficiency
...
Avoids redundant filtering with non-nested nodes.
2017-03-02 18:04:06 -08:00
Syrus Akbary
4cc46736bf
Simplified DjangoFilterConnectionField logic
2017-03-02 18:00:05 -08:00
Pablo Chinea
7f471252da
Avoids redundant filtering with non-nested nodes.
2017-02-23 14:24:25 +00:00
Pablo Chinea
b26f914b54
Fixes filtering in nested nodes.
2016-12-29 15:40:12 +00:00
Syrus Akbary
775221c427
Fixed returns in class init
2016-10-15 18:19:34 -07:00
Syrus Akbary
7fbc3e69b1
Improved Django List retreival and added extra tests.
2016-09-21 19:34:30 -07:00
Conrad Kramer
17178cfcbf
Added a DjangoToManyField to handle to-many relationships
...
To-many relationships return a manager, which needs to be turned
into an iterable (its queryset) using `maybe_queryset`.
2016-09-20 21:25:05 -07:00
Syrus Akbary
459e390b47
Fixed connection field if django-filter is not installed
2016-09-17 18:41:14 -07:00
Syrus Akbary
4e23c3ccf6
Improved python syntax and sorts (pep8). Improved Readme
2016-09-17 17:09:56 -07:00
Syrus Akbary
0434899b4e
Isolated Graphene Django in a new package
2016-09-17 16:31:17 -07:00