Commit Graph

10 Commits

Author SHA1 Message Date
Thomas Leonard
d12ea31f88 feat!: check django model has a default ordering when used in a relay connection 2024-01-29 23:36:04 +01:00
Laurent
b85177cebf
fix: same type list (#1492)
* fix: same type list

* chore: improve test
2024-01-20 16:36:00 +08:00
Kien Dang
9a773b9d7b
Use ruff in pre-commit (#1441)
* Use ruff in pre-commit

* Add pyupgrade

* Add isort

* Add bugbear

* Fix B015 Pointless comparison

* Fix B026

* B018 false positive

* Remove flake8 and isort config from setup.cfg

* Remove black and flake8 from dev dependencies

* Update black

* Show list of fixes applied with autofix on

* Fix typo

* Add C4 flake8-comprehensions

* Add ruff to dev dependencies

* Fix up
2023-08-06 01:47:00 +03:00
Steven DeMartini
20a6cecc4c Add test validating query performance with select_related + prefetch_related
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.
2023-05-03 11:37:17 +03:00
Sebastián Sastoque H
ea593b673f
Fix: Use resolver passed as an attribute (#1131)
Co-authored-by: Sebastian Hernandez <sebastian@rhinoafrica.com>
2021-02-23 09:50:19 -08:00
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
b4e34a5794
Improve DjangoListField (#929) 2020-05-09 12:28:03 +01:00
Jean-Louis Fuchs
b9f0e4f9ae
Make tests order independent (#932)
* 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
2020-04-20 13:23:20 +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
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