cic-internal-integration/apps/cic-eth/cic_eth/graphql/app.py
2021-11-01 10:48:05 +03:00

25 lines
516 B
Python

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)