from webapi.bootstrap.app_factory import create_app from webapi.config.app_settings import site_settings from fastapi.responses import RedirectResponse import uvicorn from typing import Any from webapi.routes import registration_metrics app = create_app() # Include routers app.include_router(registration_metrics.router) @app.get("/", status_code=301) async def root(): """ TODO: redirect client to /docs """ return RedirectResponse("docs") if __name__ == "__main__": uvicorn.run( app="main:app", host=site_settings.SERVER_HOST, port=site_settings.SERVER_PORT ) def get_context() -> Any: # Define your context function. This is where you can set up authentication, database connections, etc. return {} def get_root_value() -> Any: # Define your root value function. This is where you can set up the root value for GraphQL. return {}