@@ -6,7 +6,13 @@ use std::time::Duration;
66
77use super :: { config:: Config , error:: SubgraphServiceError , routes} ;
88use anyhow:: anyhow;
9- use axum:: { async_trait, routing:: post, Json , Router } ;
9+ use async_graphql:: { EmptySubscription , Schema } ;
10+ use async_graphql_axum:: GraphQL ;
11+ use axum:: {
12+ async_trait,
13+ routing:: { post, post_service} ,
14+ Json , Router ,
15+ } ;
1016use indexer_common:: indexer_service:: http:: {
1117 AttestationOutput , IndexerServiceImpl , IndexerServiceResponse ,
1218} ;
@@ -173,6 +179,13 @@ pub async fn run() -> anyhow::Result<()> {
173179 . clone ( ) ,
174180 } ) ;
175181
182+ let schema = Schema :: build (
183+ routes:: dips:: AgreementQuery { } ,
184+ routes:: dips:: AgreementMutation { } ,
185+ EmptySubscription ,
186+ )
187+ . finish ( ) ;
188+
176189 IndexerService :: run ( IndexerServiceOptions {
177190 release,
178191 config : config. 0 . clone ( ) ,
@@ -182,6 +195,7 @@ pub async fn run() -> anyhow::Result<()> {
182195 extra_routes : Router :: new ( )
183196 . route ( "/cost" , post ( routes:: cost:: cost) )
184197 . route ( "/status" , post ( routes:: status) )
198+ . route ( "/dips" , post_service ( GraphQL :: new ( schema) ) )
185199 . with_state ( state) ,
186200 } )
187201 . await
0 commit comments