docs: readme example be correct rust

This commit is contained in:
Marais Rossouw 2022-09-01 20:09:15 +10:00
parent a50f65b920
commit 642cccb5fe
1 changed files with 3 additions and 3 deletions

View File

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