@@ -61,9 +61,13 @@ async fn main() -> anyhow::Result<()> {
6161 . allow_any_origin ( )
6262 . build ( ) ;
6363 let log = warp:: log ( "api::request" ) ;
64- let status = warp:: get ( ) . and ( warp:: path ( "status" ) ) . map ( || format ! ( "OK" ) ) ;
64+ let status = warp:: get ( )
65+ . and ( warp:: path ( "status" ) )
66+ . and ( warp:: path:: end ( ) )
67+ . map ( || format ! ( "OK" ) ) ;
6568 let auth = warp:: post ( )
6669 . and ( warp:: path ( "auth" ) )
70+ . and ( warp:: path:: end ( ) )
6771 . and ( env. clone ( ) )
6872 . and ( warp:: body:: json ( ) )
6973 . and ( warp:: addr:: remote ( ) )
@@ -118,9 +122,11 @@ async fn main() -> anyhow::Result<()> {
118122
119123 let query = warp:: post ( )
120124 . and ( warp:: path ( "query" ) )
125+ . and ( warp:: path:: end ( ) )
121126 . and ( make_graphql_filter ( graphql:: schema ( ) , context. clone ( ) ) ) ;
122127
123128 let subscriptions = warp:: path ( "subscriptions" )
129+ . and ( warp:: path:: end ( ) )
124130 . and ( warp:: ws ( ) )
125131 . and ( context)
126132 . and ( warp:: any ( ) . map ( move || Arc :: clone ( & coordinator) ) )
@@ -137,10 +143,12 @@ async fn main() -> anyhow::Result<()> {
137143 } )
138144 . map ( |reply| warp:: reply:: with_header ( reply, "Sec-WebSocket-Protocol" , "graphql-ws" ) ) ;
139145
140- let playground = warp:: path ( "playground" ) . and ( playground_filter (
141- "/graphql/query" ,
142- Some ( "/graphql/subscriptions" ) ,
143- ) ) ;
146+ let playground = warp:: path ( "playground" )
147+ . and ( warp:: path:: end ( ) )
148+ . and ( playground_filter (
149+ "/graphql/query" ,
150+ Some ( "/graphql/subscriptions" ) ,
151+ ) ) ;
144152
145153 warp:: path ( "graphql" ) . and ( query. or ( subscriptions) . or ( playground) )
146154 } ;
0 commit comments