File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed
server/graphman/src/entities Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,11 @@ use async_graphql::SimpleObject;
55#[ derive( Clone , Debug , SimpleObject ) ]
66pub struct EmptyResponse {
77 pub success : bool ,
8- pub message : Option < String > ,
98}
109
1110impl EmptyResponse {
1211 /// Returns a successful response.
13- pub fn new ( msg : Option < String > ) -> Self {
14- Self {
15- success : true ,
16- message : msg,
17- }
12+ pub fn new ( ) -> Self {
13+ Self { success : true }
1814 }
1915}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ mod deployment_version_selector;
99mod empty_response;
1010mod execution;
1111mod execution_id;
12+ mod response;
1213mod subgraph_health;
1314
1415pub use self :: block_hash:: BlockHash ;
@@ -22,4 +23,5 @@ pub use self::deployment_version_selector::DeploymentVersionSelector;
2223pub use self :: empty_response:: EmptyResponse ;
2324pub use self :: execution:: Execution ;
2425pub use self :: execution_id:: ExecutionId ;
26+ pub use self :: response:: Response ;
2527pub use self :: subgraph_health:: SubgraphHealth ;
Original file line number Diff line number Diff line change 1+ use async_graphql:: SimpleObject ;
2+
3+ #[ derive( Clone , Debug , SimpleObject ) ]
4+ pub struct Response {
5+ pub success : bool ,
6+ pub message : String ,
7+ }
8+
9+ impl Response {
10+ /// Returns a response with success & message.
11+ pub fn new ( success : bool , msg : String ) -> Self {
12+ Self {
13+ success,
14+ message : msg,
15+ }
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments