Commit Graph

808 Commits

Author SHA1 Message Date
Santiago Aguiar
7c780a916a
Backport Django 4.1 compatibility fixes to v2 (#1413)
* handle deprecation warning for requires_system_checks

Removed in django 4.1.

* Fix broken UT due to pytest import error (#1368)

* import error resolved?

* Fix tests

* Remove Python 3.6

* django 4.1 requires python>=3.10

* Django 4.1 does support python 3.8 to 3.11

* Add Django 4.1 to tox

---------

Co-authored-by: Yuekui <yuekui@users.noreply.github.com>
Co-authored-by: Josh Warwick <josh.warwick15@gmail.com>
Co-authored-by: Kien Dang <mail@kien.ai>
2023-05-26 23:08:36 +03:00
Ülgen Sarıkavak
ede3880abb
Sync trove classifiers with tox.ini (#1341)
* Sync trove classifiers with tox.ini

* No need for Python 3 condition anymore
2022-09-02 18:55:39 +03:00
Ülgen Sarıkavak
8383bdc5aa
pre-commit & black (#1340)
* Call black via pre-commit
* Apply black
2022-08-19 09:15:44 +03:00
Ülgen Sarıkavak
e980cede38
Upgrade Python version in CI (#1339) 2022-08-18 13:02:41 +03:00
Ülgen Sarıkavak
12ec3ca4ac
Introduce pre-commit config for flake8 (#1338) 2022-08-18 12:48:51 +03:00
Peter Paul Kiefer
ed4ee98596
V2 has broken liks too see #1309 (#1310)
* fix broken links for the v2 branch

v2 brach has broken links to read the docs too

I additionally found a link to the git hub master tree, which should be
changed to main.

* #1295 github link fixed (master->v2)

Co-authored-by: Peter Paul Kiefer <dafisppk@gmail.com>
2022-02-13 08:50:04 +03:00
Yair Silbermintz
a7a8b3dca6
Replace calls to methods removed in Django v4 (#1275)
* Replace calls to deprecated methods

* Fix test config & Replace additional methods removed in django 4.0

* Update tox for official Django 4 release

* 2.16.0

* Revert version update

* Remove duplicate entry

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Limit max Django version

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

* Remove Python 3.5 (deprecated) from tox

Co-authored-by: Jeremy Stretch <jstretch@ns1.com>

Co-authored-by: Ülgen Sarıkavak <ulgens@users.noreply.github.com>
Co-authored-by: Jeremy Stretch <jstretch@ns1.com>
2022-02-07 17:16:41 +03:00
Rainshaw
d52b18a700
update js version (#1189) 2021-04-20 23:05:49 -07:00
Thomas Leonard
998ed89a4e
feat: add TypedFilter which allow to explicitly give a filter input GraphQL type (#1142)
Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2021-03-31 10:32:00 -07:00
Thomas Leonard
6f1389c039
fix: declaration of required variable in filters v2 (#1136)
* fix: declaration of required variable

* Add unit test

* Fix flaky test

* Formatting

* Fix for python 2.7

Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2021-03-11 03:49:58 +03:00
Thomas Leonard
e323e2bc0b
Add enum support to filters and fix filter typing (v2) (#1114)
* - Add filtering support for choice fields converted to graphql Enum (or not)
- Fix type of various filters (used to default to String)
- Fix bug with contains introduced in previous PR
- Fix bug with declared filters being overridden (see PR #1108)
- Fix support for ArrayField and add documentation

* Fix tests

Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2021-02-22 20:22:09 -08:00
Lucas
e0a5d1c58e
Support "contains" and "overlap" filtering (v2) (#1100)
* Fix project setup

* Support contains/overlap filters

* Add Python 2.7 support

* Adjust docstrings

* Remove unused fixtures
2021-01-18 21:39:18 -08:00
Ülgen Sarıkavak
66c8901041
Convert Django form / DRF decimals to Graphene decimals (#958)
* Convert Django form decimals to Graphene decimals

* Ugly fix for test_should_query_filter_node_limit

* Convert DRF serializer decimal to Graphene decimal
2021-01-09 22:00:11 -08:00
Ülgen Sarıkavak
e24675e5b7
Fix backward compability on GraphQLTestCase._client setter (#1093) 2021-01-09 19:16:18 -08:00
Thomas Leonard
aff56b882b
Validate in and range filter inputs (#1092)
Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2021-01-09 19:15:56 -08:00
Rustam Ganeyev
1281c1338d
Introduced optional_fields to SerializationMutation (#1080)
* added optional_field to SerializationMutation to forcefully mark some fields as optional

* added tests
2021-01-01 20:36:50 -08:00
Jason Kraus
caf9548610 v2.15.0 2020-12-30 22:46:51 -08:00
Ülgen Sarıkavak
40e5252936
Use the Django TestCase's Client (#1084)
* Use the Django Client test utility instance that Django provides with its TestCase class. This allows GraphQL tests to make use of the stateful client methods like login()

* Add missing test case initializer call

* Don't break backward compability

* Add test for pending deprecation warning on GraphQLTestCase._client

Co-authored-by: Tom Nightingale <tom@tnightingale.com>
2020-12-30 21:12:24 -08:00
Thiago Bellini Ribeiro
8c48516093
Also convert BaseCSVFilter for custom fields (#1081) 2020-12-30 21:03:57 -08:00
Jason Kraus
2d0b9ddd42
improvement: convert decimal field to graphene decimal (#1083) 2020-12-30 08:25:41 -08:00
Tim Gates
e559a42374
docs: fix simple typo, outputing -> outputting (#1077)
There is a small typo in docs/debug.rst.

Should read `outputting` rather than `outputing`.
2020-12-29 11:30:30 -08:00
Rustam Ganeyev
dab6080fcf
Fixed typo in documentation (#1078)
Added missing kwargs to documentation
2020-12-29 11:30:10 -08:00
Jason Kraus
558288afce v2.14.0 2020-12-22 20:23:41 -08:00
Ignacio Orlandini
8f63199a63
Handle database transactions (#1039)
* Handle Django database atomic requests

* Create and handle database atomic mutations

* Make code compatible with Python 2.7

* Code style

* Define set_rollback instead of using the one in rest_framework.views because of backward compatibility

* Implement mock.patch.dict
2020-12-22 20:18:14 -08:00
Semyon Pupkov
a51c2bffd9
Allow to use camel case in order by field (#1054)
Fixes #1008
2020-12-22 20:15:38 -08:00
Leonardo Arroyo
0e12343853
Fix issue #1055 (#1056)
* 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)>
2020-12-22 20:13:34 -08:00
Semyon Pupkov
cc3bd05472
Replace Unidecode package with text_unidecode package #1014 (#1060)
Closes #1014
2020-12-22 20:12:22 -08:00
Thomas Leonard
99512c53a1
fix: in and range filters on DjangoFilterConnectionField (#1070)
Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2020-12-22 20:10:39 -08:00
Jason Kraus
7b35695067
Fix 1061: DjangoListField should not cache queries (#1063)
* 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
2020-12-22 20:10:28 -08:00
Thomas Leonard
454b74052e
Fix backward Relay pagination (#1046)
* Fix backward Relay pagination

* linting

Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2020-12-22 20:04:45 -08:00
Ülgen Sarıkavak
4c0c821b74
Register MultipleChoiceField as list type (#1033)
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.
2020-11-28 10:30:18 -08:00
Tonye Jack
4b7119d691
Add a default msg to show the response content. (#1064)
* 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
2020-11-27 15:52:42 -08:00
Semyon Pupkov
eb7a0265d8
Use explicit classmethod in simple mutation example (#1059)
rel #1038
2020-11-09 09:06:53 -08:00
Semyon Pupkov
0888c748fd
Change build badge from travis to github actions (#1058) 2020-11-07 21:44:37 -08:00
Nishchit
f554911397
Section added GraphQL testing clients (#919) 2020-11-06 16:04:45 -08:00
Semyon Pupkov
8571bc465a
Improve ordering doc example (#1053) 2020-11-01 10:16:15 -08:00
Thomas Leonard
2140be5e6a
Add offset pagination (#1013)
* Add offset filtering

* Formatting

Co-authored-by: Thomas Leonard <thomas@loftorbital.com>
2020-10-26 09:09:21 -07:00
Roberto Barreda
8408c51bf9
fix variables key in body (#1050) 2020-10-26 09:09:49 +00:00
Jonathan Kim
8928ec2dbe
Restrict DjangoRestFramework version (#1047) 2020-10-19 20:20:30 +01:00
CBuiVNG
65f41c1a17
BUGFIX: don't filter out lookup_field as input (required for update) (#1029) 2020-10-19 17:25:35 +01:00
Andreas Hasenkopf
ee3d4f521f
Include tests and examples in source package, but don't install them (#1034)
..., but don't install them.
Also applied changes as suggested by `black`.
2020-10-19 17:23:41 +01:00
Jonathan Kim
2e806384f6
Update stale.yml 2020-08-27 12:48:29 +01:00
Jonathan Kim
86a66db1f6
Disable stalebot 2020-08-26 16:20:41 +01:00
Josh Warwick
19e3eddddb
Allow passing of meta object in SerializerMutation options (#1028) 2020-08-26 16:03:08 +01:00
DJ Kim
f5d94fda1f
Update testing.rst (#1026)
Co-authored-by: DJ Kim <djkim@paloaltonetworks.com>
2020-08-26 16:01:44 +01:00
Semyon Pupkov
88eefb0e07
Fix testing doc (#1024) 2020-08-26 15:59:43 +01:00
Ülgen Sarıkavak
26960359a2
Add msg params to testing class (#1032) 2020-08-26 15:58:48 +01:00
Varun Dey
6ce208db95
Fix missing colon in function definition (#1030) 2020-08-26 15:57:53 +01:00
Varun Dey
ac1f9ac360
Fix grammar (#1027) 2020-08-24 17:19:53 +01:00
Jonathan Kim
5b1451132d
v2.13.0 2020-08-12 07:10:01 +01:00