Newer
Older
from flask_security import Security, login_required
from flask_graphql import GraphQLView
from os import environ
from database.database import db_session, init_db, get_user_datastore
app = Flask(__name__)
app.debug = True if "DEBUG" in environ and environ["DEBUG"] else False
app.add_url_rule(
'/graphql',
view_func=GraphQLView.as_view(
'graphql',
schema=schema,
graphiql=app.debug # for having the GraphiQL interface