morgante/django-graph-auth

Exception when importing graphe_auth.schema : cannot import name 'DjangoFilterConnectionField'

Opened this issue · 3 comments

import graph_auth.schema causes exception importing DjangoFilterConnectionField
probably because I am using the latest graphene / graphene-django which may have changed some things about filters...? Here's my relevant environment:

Django==1.11
django-graph-auth==0.3.1
graphene==1.4
graphene-django==1.3
graphql-core==1.1
graphql-relay==0.4.5
python 3.5

Full stack trace:
django_1 | Internal Server Error: /api/
django_1 | Traceback (most recent call last):
django_1 | File "/usr/local/lib/python3.5/site-packages/graphene_django/settings.py", line 74, in import_from_string
django_1 | module = importlib.import_module(module_path)
django_1 | File "/usr/local/lib/python3.5/importlib/init.py", line 126, in import_module
django_1 | return _bootstrap._gcd_import(name[level:], package, level)
django_1 | File "", line 986, in _gcd_import
django_1 | File "", line 969, in _find_and_load
django_1 | File "", line 958, in _find_and_load_unlocked
django_1 | File "", line 673, in _load_unlocked
django_1 | File "", line 673, in exec_module
django_1 | File "", line 222, in _call_with_frames_removed
django_1 | File "/code/backend/schema.py", line 3, in
django_1 | import graph_auth.schema
django_1 | File "/usr/local/lib/python3.5/site-packages/graph_auth/schema.py", line 5, in
django_1 | from graphene_django.filter import DjangoFilterConnectionField
django_1 | ImportError: cannot import name 'DjangoFilterConnectionField'
django_1 |

thanks for your work on this!

Perhaps install django-filter, as graphene_django.filter.DjangoFilterConnectionField depends on it.

Tested, @dervos 's answer works. Link to django-filter repo: https://github.com/carltongibson/django-filter

@clodal Would you mind making a PR to include django-filter as a dependency?