Skip to content

Commit

Permalink
📝 add README
Browse files Browse the repository at this point in the history
  • Loading branch information
bannzai committed Jan 12, 2022
1 parent 971a411 commit cc75030
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ And nodecheck has independ flag for allow exclude types of nodecheck.
Full example

```go
func main() {
var excludes string
flag.StringVar(&excludes, "excludes", "", "exclude GraphQL types for node check. it can specify multiple values separated by `,` and it can use regex(e.g .+Connection")
flag.Parse()

Expand All @@ -37,34 +39,26 @@ Full example
multichecker.Main(
analyzer,
)
}
```

`lackid` provides a typical main function and you can install with `go install` command.

```sh
$ go install github.com/gqlgo/lackid/cmd/lackid@latest
```

The `lackid` command has two flags, `schema` and `query` which will be parsed and analyzed by lackid's Analyzer.
`nodecheck` provides a executable binary. So, you can get cmd tool via `go install` command.

```sh
$ lackid -schema="server/graphql/schema/**/*.graphql" -query="client/**/*.graphql"
$ go install github.com/gqlgo/nodecheck/cmd/nodecheck@latest
```

The default value of `schema` is "schema/*/**.graphql" and `query` is `query/*/**.graphql`.

`schema` flag accepts URL for a endpoint of GraphQL server.
`lackid` will get schemas by an introspection query via the endpoint.
The `nodecheck` command receive two flags, `schema` and `excludes`. `excludes` can specify with regex format and it can receive multiple arguments separated by ','.

```sh
$ lackid -schema="https://example.com" -query="client/**/*.graphql"
$ nodecheck -schema="server/graphql/schema/**/*.graphql" -excludes=.+Connection,.+Edge
```

## Author

[![Appify Technologies, Inc.](appify-logo.png)](http://github.com/appify-technologies)

<!-- links -->
[gopkg]: https://pkg.go.dev/github.com/gqlgo/lackid
[gopkg-badge]: https://pkg.go.dev/badge/github.com/gqlgo/lackid?status.svg
[gopkg]: https://pkg.go.dev/github.com/gqlgo/nodecheck
[gopkg-badge]: https://pkg.go.dev/badge/github.com/gqlgo/nodecheck?status.svg

0 comments on commit cc75030

Please sign in to comment.