In a fresh env I get the below:
Mikkos-Air:Studio-Stream mikko$ python app.py
Traceback (most recent call last):
File "app.py", line 3, in <module>
from flask_graphql import GraphQLView
File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/__init__.py", line 1, in <module>
from .blueprint import GraphQL
File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/blueprint.py", line 5, in <module>
from .graphqlview import GraphQLView
File "/Users/mikko/miniconda3/lib/python3.6/site-packages/Flask_GraphQL-2.0.0-py3.6.egg/flask_graphql/graphqlview.py", line 7, in <module>
from graphql_server import (HttpQueryError, default_format_error,
File "/Users/mikko/miniconda3/lib/python3.6/site-packages/graphql_server_core-1.1.1-py3.6.egg/graphql_server/__init__.py", line 5, in <module>
from graphql import get_default_backend
ImportError: cannot import name 'get_default_backend'
Workaround is to:
pip install graphql-core==2.2.1
pip install graphene==2.1.8
@mikkokotila the new version of graphql-core v3 removes the backend feature that was present in v2. It looks like Flask GraphQL needs to update it's dependencies so that it's not including a version of graphql-core it doesn't support.
Ah looks like I've already created a PR for this which I have forgotten about! https://github.com/graphql-python/flask-graphql/pull/60 I'll try and bring it up to date.
Experiencing the same problem, any other suggested solution other than waiting the PR to be merged?
@jkimbo I see Travis builds were failing, so I created https://github.com/graphql-python/flask-graphql/pull/65
Please mix it guys https://github.com/graphql-python/flask-graphql/pull/65
Thanks @babaMar
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Looks like this issue has been fixed in flask-graphql
Most helpful comment
@jkimbo I see Travis builds were failing, so I created https://github.com/graphql-python/flask-graphql/pull/65