cic-internal-integration/apps/cic-eth/cic_eth/graphql/app.py

25 lines
516 B
Python
Raw Normal View History

2021-11-01 08:48:05 +01:00
from cic_eth.graphql.schema import schema
from flask import Flask
from flask_graphql import GraphQLView
def create_app():
app = Flask(__name__)
app.add_url_rule(
'/graphql',
view_func=GraphQLView.as_view(
'graphql',
schema=schema,
graphiql=True
)
)
@app.route("/")
def test():
return "Test ok!"
return app
if __name__ == "__main__":
app = create_app()
app.run(host='0.0.0.0', port=5000)