-
Notifications
You must be signed in to change notification settings - Fork 227
Description
The flask_sqlalchemy example does not run with the current instructions in the README.md with py3.7, py3.9, py3.10
Here is the list of dependencies that get installed
Successfully installed Flask-GraphQL-2.0.0 Jinja2-3.1.2 MarkupSafe-2.1.2 SQLAlchemy-2.0.14 Werkzeug-2.3.4 aiodataloader-0.4.0 aniso8601-9.0.1 blinker-1.6.2 click-8.1.3 flask-2.3.2 graphene-3.2.2 graphene-sqlalchemy-3.0.0b4 graphql-core-3.2.3 graphql-relay-3.2.0 graphql-server-core-1.1.1 greenlet-2.0.2 itsdangerous-2.1.2 promise-2.3 six-1.16.0 typing-extensions-4.5.0
Leads to a series of ImportErrors
ImportError: cannot import name 'GraphQLResolveInfo' from 'graphql'
ImportError: cannot import name 'get_default_backend' from 'graphql'
ImportError: cannot import name 'MutableMapping' from 'collections' for py3.10
Downgrading to
graphene-sqlalchemy==2.3.0
graphene==2.1.8
graphql-core==2.2.1
Plus the following code change makes it possible to start the web server.
engine = create_engine("sqlite:///database.sqlite3", convert_unicode=True)
# to
engine = create_engine("sqlite:///database.sqlite3")