Open remingtonc opened 7 years ago
Moving issue to graphene-sqlalchemy as it is more applicable.
@remingtonc This might help https://github.com/graphql-python/graphene-sqlalchemy/tree/master/examples/flask_sqlalchemy :)
@syrusakbary Thank you! That is the tutorial I have been following, however I am attempting to use Flask-SQLAlchemy instead of SQLAlchemy alone. It does not appear to work out of the box when modeling using the convenience of Flask-SQLAlchemy.
This isn't a tremendous issue because I can always convert over to just SQLAlchemy, but it would be nice if they worked together. I could easily be wrong, and hope I am :)
I set the session:
schema = graphene.Schema()
schema.execute(context_value={'session': db.session})
On query:
{ "errors": [ { "message": "'NoneType' object has no attribute 'fields'" } ], "data": null }
@remingtonc I ran into this recently, any update since you reported? thanks
Based on the tutorial setup and personal testing, it doesn't appear that these two methods work in tandem. Any examples of these interoperating? Or should I switch to raw SQLAlchemy to support GraphQL?