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
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"))