Skip to content

Commit c4d7738

Browse files
committed
Update README with the use of graphiql command
1 parent b11f369 commit c4d7738

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ LOCAL_BUILD := $(shell date +"%m-%d-%Y_%H_%M_%S")
44
LOCAL_LDFLAGS = -s -X main.version=$(LOCAL_TAG) -X main.build=$(LOCAL_BUILD)
55

66
build-cli:
7-
go build -o bin/graphiql -ldflags "$(LOCAL_LDFLAGS)" cmd/graphiql/main.go
8-
9-
install-cli: build-cli
10-
mv bin/graphiql $(GOPATH)/bin
11-
rm -rf bin
7+
go build -o bin/graphiql -ldflags "$(LOCAL_LDFLAGS)" cmd/graphiql/main.go

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ An utility wrote on Go for using GraphiQL without need to use NPM.
77
[Try the live demo.](http://graphql.org/swapi-graphql)
88

99
## Getting started
10-
To install the library, run:
10+
To install the library, run
1111

1212
```bash
1313
go get -u github.com/friendsofgo/graphiql
1414
```
1515

16+
To build graphi's CLI you must run
17+
```bash
18+
make build-cli
19+
```
20+
This will generate a binary in the project's bin directory called graphiql. You can then move this binary to anywhere in your `PATH`.
21+
1622
### Use GraphiQL on your own server
1723
If you've a GraphQL server on GO and you want to include the GraphiQL
1824
on it, it's as simple as this:
@@ -61,6 +67,9 @@ func main() {
6167
http.ListenAndServe(":4040", nil)
6268
}
6369

70+
## CLI
71+
72+
6473
## Contribute
6574
[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.
6675

0 commit comments

Comments
 (0)