File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ mod request_context;
77mod request_handler;
88mod request_template;
99mod response;
10- mod showcase;
10+ pub mod showcase;
1111
1212pub use cache:: * ;
1313pub use data_loader:: * ;
@@ -17,6 +17,5 @@ pub use request_context::RequestContext;
1717pub use request_handler:: { graphiql, handle_request} ;
1818pub use request_template:: RequestTemplate ;
1919pub use response:: * ;
20- pub use showcase:: * ;
2120
2221pub use crate :: app_context:: AppContext ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use serde::de::DeserializeOwned;
1010
1111use super :: request_context:: RequestContext ;
1212use super :: showcase:: ShowcaseResources ;
13- use super :: { showcase_get_app_ctx , AppContext } ;
13+ use super :: { showcase , AppContext } ;
1414use crate :: async_graphql_hyper:: { GraphQLRequestLike , GraphQLResponse } ;
1515
1616pub fn graphiql ( req : & Request < Body > ) -> Result < Response < Body > > {
@@ -119,7 +119,7 @@ pub async fn handle_request<T: DeserializeOwned + GraphQLRequestLike>(
119119 }
120120 hyper:: Method :: POST
121121 if app_ctx. blueprint . server . enable_showcase
122- && req. uri ( ) . path ( ) . ends_with ( "/showcase/graphql" ) =>
122+ && req. uri ( ) . path ( ) == "/showcase/graphql" =>
123123 {
124124 let resources = ShowcaseResources {
125125 http : app_ctx. universal_http_client . clone ( ) ,
@@ -130,7 +130,7 @@ pub async fn handle_request<T: DeserializeOwned + GraphQLRequestLike>(
130130 cache : app_ctx. cache . clone ( ) ,
131131 } ;
132132
133- let app_ctx = match showcase_get_app_ctx :: < T > ( & req, resources) . await ? {
133+ let app_ctx = match showcase :: create_app_ctx :: < T > ( & req, resources) . await ? {
134134 Ok ( app_ctx) => app_ctx,
135135 Err ( res) => return Ok ( res) ,
136136 } ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pub struct ShowcaseResources {
2727 pub cache : Arc < EntityCache > ,
2828}
2929
30- pub async fn showcase_get_app_ctx < T : DeserializeOwned + GraphQLRequestLike > (
30+ pub async fn create_app_ctx < T : DeserializeOwned + GraphQLRequestLike > (
3131 req : & Request < Body > ,
3232 resources : ShowcaseResources ,
3333) -> Result < Result < AppContext , Response < Body > > > {
You can’t perform that action at this time.
0 commit comments