Skip to content

Commit

Permalink
examples/http-post: fixes 'newline redundant' validation
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-ramon committed Oct 11, 2020
1 parent cb98aa4 commit 089f1ba
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions examples/http-post/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,36 @@ func main() {
}
})

fmt.Println("Now server is running on port 8080\n")
fmt.Println("Now server is running on port 8080")

fmt.Println("")

fmt.Println(`Get single todo:
curl \
-X POST \
-H "Content-Type: application/json" \
--data '{ "query": "{ todo(id:\"b\") { id text done } }" }' \
http://localhost:8080/graphql
`)
http://localhost:8080/graphql`)

fmt.Println("")

fmt.Println(`Create new todo:
curl \
-X POST \
-H "Content-Type: application/json" \
--data '{ "query": "mutation { createTodo(text:\"My New todo\") { id text done } }" }' \
http://localhost:8080/graphql
`)
http://localhost:8080/graphql`)

fmt.Println("")

fmt.Println(`Update todo:
curl \
-X POST \
-H "Content-Type: application/json" \
--data '{ "query": "mutation { updateTodo(id:\"a\", done: true) { id text done } }" }' \
http://localhost:8080/graphql
`)
http://localhost:8080/graphql`)

fmt.Println("")

fmt.Println(`Load todo list:
curl \
Expand Down

0 comments on commit 089f1ba

Please sign in to comment.