|
1 | 1 | # Golang GraphiQL |
| 2 | +[](https://badge.fury.io/gh/friendsofgo%2Fgraphiql) |
2 | 3 | [](https://travis-ci.org/friendsofgo/graphiql) |
| 4 | +[](https://goreportcard.com/report/github.com/friendsofgo/graphiql) |
| 5 | +[](https://cdnjs.com/libraries/graphiql) |
3 | 6 | [](https://godoc.org/github.com/friendsofgo/graphiql) |
4 | 7 |
|
5 | 8 | An utility wrote on Go for using GraphiQL without need to use NPM. |
@@ -66,9 +69,33 @@ func main() { |
66 | 69 | http.Handle("/graphiql", graphiqlHandler) |
67 | 70 | http.ListenAndServe(":4040", nil) |
68 | 71 | } |
| 72 | +``` |
69 | 73 |
|
70 | 74 | ## CLI |
| 75 | +Yo can use `graphiql` as command |
| 76 | +```bash |
| 77 | +$ graphiql --help |
| 78 | +usage: graphiql [-version] [OPTIONS] |
| 79 | + graphiql is an standalone server to use Graphiql, based on https://github.com/graphql/graphiql |
| 80 | + |
| 81 | + -endpoint string |
| 82 | + Endpoint where are hosted your API, eg: http://localhost:8080/graphql (default "http://localhost:8080/graphql") |
| 83 | + -graphiql |
| 84 | + Show the js client of GraphiQL version |
| 85 | + -port string |
| 86 | + Port where will be launched the GraphiQL client (default "4040") |
| 87 | + -version |
| 88 | + Show the graphiql version information |
| 89 | +``` |
71 | 90 |
|
| 91 | +And it'll launch a `GraphiQL` server |
| 92 | +```bash |
| 93 | +$ graphiql |
| 94 | + |
| 95 | +2018/11/24 17:10:36 GraphiQL run on http://localhost:4040... |
| 96 | +2018/11/24 17:10:36 GraphQL endpoint http://localhost:8080/graphql |
| 97 | +2018/11/24 17:10:36 Use (ctrl+c) for terminate the execution |
| 98 | +``` |
72 | 99 |
|
73 | 100 | ## Contribute |
74 | 101 | [Contributions](https://github.com/friendsofgo/graphiql/issues?q=is%3Aissue+is%3Aopen) are more than welcome, if you are interested please fork this repo and send your Pull Request. |
|
0 commit comments