graphene-django/graphene_django/tests
Steven DeMartini f67c5dbc8c Revert field resolver logic to fix poor query performance
This reverts the change to `convert_field_to_djangomodel` introduced in
https://github.com/graphql-python/graphene-django/pull/1315 for the
reasons discussed here
https://github.com/graphql-python/graphene-django/pull/1315/files#r1015659857.
As mentioned there, without reverting this code, "queries are forced
every time an object is resolved, making an exponential number of
queries when nesting without any possibility of optimizing".

That regression prevented `graphene-django-optimizer` from working with
`graphene-django` v3.0.0b9+ (where this change first was published), as
discussed in
https://github.com/graphql-python/graphene-django/issues/1356#issuecomment-1284718187,
https://github.com/tfoxy/graphene-django-optimizer/issues/86, and
https://github.com/tfoxy/graphene-django-optimizer/pull/83#issuecomment-1451987397.

For now, this marks the two tests that depended on this problematic code
as "expected to fail", and perhaps they can be reintroduced if there's a
way to support this logic in a way that does not prevent
`select_related` and `prefetch_related` query-optimization and introduce
nested N+1s.

As mentioned here
https://github.com/graphql-python/graphene-django/pull/1315#issuecomment-1468594361,
this is blocking upgrade to graphene-django v3 for many users, and
fixing this would allow many to begin upgrading and contributing to keep
graphene-django going.
2023-05-03 11:37:17 +03:00
..
issues Fix broken UT due to pytest import error (#1368) 2022-11-14 13:56:18 +03:00
__init__.py Isolated Graphene Django in a new package 2016-09-17 16:31:17 -07:00
forms.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
models.py 👷 Add pre-commit (#1336) 2022-10-19 17:10:30 +03:00
mutations.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
schema_view.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
schema.py Warn if fields or exclude are not defined on DjangoObjectType (#981) 2020-06-11 11:09:52 +01:00
test_command.py 👷 Add pre-commit (#1336) 2022-10-19 17:10:30 +03:00
test_converter.py Fix broken UT due to pytest import error (#1368) 2022-11-14 13:56:18 +03:00
test_fields.py Fix: Use resolver passed as an attribute (#1131) 2021-02-23 09:50:19 -08:00
test_forms.py Fix broken UT due to pytest import error (#1368) 2022-11-14 13:56:18 +03:00
test_get_queryset.py Revert field resolver logic to fix poor query performance 2023-05-03 11:37:17 +03:00
test_query.py Fix broken UT due to pytest import error (#1368) 2022-11-14 13:56:18 +03:00
test_schema.py Fix broken UT due to pytest import error (#1368) 2022-11-14 13:56:18 +03:00
test_types.py 👷 Add pre-commit (#1336) 2022-10-19 17:10:30 +03:00
test_utils.py 👷 Add pre-commit (#1336) 2022-10-19 17:10:30 +03:00
test_views.py 👷 Add pre-commit (#1336) 2022-10-19 17:10:30 +03:00
types.py WIP: Merge master into v3 (#1086) 2020-12-30 15:37:57 -08:00
urls_inherited.py Django v4, python 3.10 support for graphene-django v3 (#1281) 2022-01-07 20:26:07 +00:00
urls_pretty.py Django v4, python 3.10 support for graphene-django v3 (#1281) 2022-01-07 20:26:07 +00:00
urls.py Django v4, python 3.10 support for graphene-django v3 (#1281) 2022-01-07 20:26:07 +00:00