Commit Graph

7 Commits

Author SHA1 Message Date
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