Merge pull request #1057 from maraisr/maraisr/readmee-whopsie

docs: readme example be correct rust
This commit is contained in:
Sunli 2022-09-01 22:53:12 +08:00 committed by GitHub
commit dbaa3291b7

View File

@ -28,7 +28,7 @@ struct Query;
#[Object] #[Object]
impl Query { impl Query {
fn howdy() -> &'static str { fn howdy(&self) -> &'static str {
"partner" "partner"
} }
} }
@ -39,8 +39,8 @@ async fn main() {
let app = Route::new() let app = Route::new()
.at("/", .at("/",
get(graphiql) get(graphiql)
.post(GraphQL::new(schema) .post(GraphQL::new(schema))
)); );
println!("GraphiQL: http://localhost:8000"); println!("GraphiQL: http://localhost:8000");
Server::new(TcpListener::bind("0.0.0.0:8000")) Server::new(TcpListener::bind("0.0.0.0:8000"))