Broken with graphql_relay >= 3.1.1 due to wrong imports
oleo65 opened this issue · comments
- What is the current behavior?
graphql_relay
introduced some internal changes to module names which are not compatible with graphene-django
.
This is mainly due to renaming of modules and graphene-django not importing from the to level module but deeper in the package. The Readme of graphql_relay
states that everything should be imported from the top module if possible.
The current beta branch is therefore not working anymore.
- If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via
a github repo, https://repl.it or similar (you can use this template as a starting point: https://repl.it/@jkimbo/Graphene-Django-Example).
- Install graphene-django (tested with 3.0.0b7) into django with current dependencies (namely graphql-relay > 3.1.1)
- Run django.
- App crashes during import of
fields.py
- Proposed change
Change imports in fields.py
from graphql-relay
to top level module. All needed methods are available there.
from graphql_relay import (
connection_from_array_slice,
cursor_to_offset,
get_offset_with_default,
offset_to_cursor,
)
-
Please tell us about your environment:
- Version: v3.0.0b7
- Platform: linux x64
I believe this is already fixed on the main
branch. We are just awaiting a formal release.
Thanks, I literally just noticed that. Well I should have searched better. 😉