File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,5 +59,5 @@ async def request_context(service: wireup.Injected[RequestContextService]) -> di
5959 container ,
6060 app ,
6161 class_based_handlers = [DemoClassBasedHandler ],
62- graph_endpoint = GraphEndpointOptions (base_module = "graph_demo_app" ),
62+ graph_endpoint = GraphEndpointOptions (enabled = True , base_module = "graph_demo_app" ),
6363)
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ class _ClassBasedHandlersProtocol(Protocol):
6262
6363@dataclass (frozen = True )
6464class GraphEndpointOptions :
65+ enabled : bool
6566 base_module : Optional [str ] = None
6667
6768
@@ -283,7 +284,7 @@ def setup(
283284 """
284285 app .state .wireup_container = container
285286 _expose_wireup_task (container )
286- if graph_endpoint is not None :
287+ if graph_endpoint is not None and graph_endpoint . enabled :
287288 _setup_graph_routes (app , options = graph_endpoint )
288289 if middleware_mode :
289290 app .add_middleware (WireupAsgiMiddleware , include_websocket = False )
You can’t perform that action at this time.
0 commit comments