https://github.com/qneyrat/graphql-coverage
Calculate coverage on GraphQL schema
https://github.com/qneyrat/graphql-coverage
coverage graphql
Last synced: about 2 months ago
JSON representation
Calculate coverage on GraphQL schema
- Host: GitHub
- URL: https://github.com/qneyrat/graphql-coverage
- Owner: qneyrat
- Created: 2019-11-28T11:11:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-03T21:40:19.000Z (over 5 years ago)
- Last Synced: 2025-02-25T22:04:40.703Z (2 months ago)
- Topics: coverage, graphql
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# graphql-coverage
```
Calculate coverage on GraphQL schemaUsage:
graphql-coverage [graphql query file or dir] [flags]Flags:
-f, --filter string filter to search graphql queries when arg is dir (default ".graphql")
-h, --help help for graphql-coverage
--html html output
--json json input graphql query
-m, --max-depth int max depth to search graphql queries when arg is dir (default 1)
-o, --output string output file (default "coverage.out")
-s, --schema string graphql schema (default "schema.graphql")
```## Example usage
### Basic:
```
go run cmd/graphql-coverage/main.go --schema examples/schema.graphql examples/queries
```### HTML output
```
go run cmd/graphql-coverage/main.go --schema examples/schema.graphql --html --output coverage.html examples/queries
```### Input queries
Use `-f` to search graphql queries in path (by default `.graphql`)Use `--json` if your queries are graphql queries in json like
```
{
"query":"query YourQuery) {}",
"variables":{"yourvar":"value"},
"operationName":"YourQuery"
}
```