1
1
# graphql-schema-picker
2
2
3
+ [ ![ GoReportCard example] ( https://goreportcard.com/badge/github.com/kevinmichaelchen/graphql-schema-picker )] ( https://goreportcard.com/report/github.com/kevinmichaelchen/graphql-schema-picker )
4
+ [ ![ version] ( https://img.shields.io/github/v/release/kevinmichaelchen/graphql-schema-picker?include_prereleases&label=latest&logo=ferrari )] ( https://github.com/kevinmichaelchen/graphql-schema-picker/releases/latest )
5
+ [ ![ Code Climate maintainability] ( https://img.shields.io/codeclimate/maintainability/kevinmichaelchen/graphql-schema-picker )] ( https://codeclimate.com/github/kevinmichaelchen/graphql-schema-picker )
6
+
3
7
<img width =" 600 " src =" https://github.com/kevinmichaelchen/graphql-schema-picker/assets/5129994/0b7c6707-a76f-4a49-9539-279969307fc8 " />
4
8
5
9
A CLI for selectively pruning your GraphQL schemas.
6
10
7
- The CLI accepts a Schema Definition Language file, and then selectively picks
11
+ The CLI accepts a Schema Definition Language file, and then selectively picks
8
12
(or filters out) certain elements.
9
13
10
14
## Motivation
11
15
12
- This tool was born out of a desire to reuse Hasura's schema in upstream
16
+ This tool was born out of a desire to reuse Hasura's schema in upstream
13
17
microservices. In my case, it meant discarding the tens of thousands of lines
14
- in the schema that was introspected from Hasura, and really only paying
18
+ in the schema that was introspected from Hasura, and really only paying
15
19
attention to the few types I cared about.
16
20
17
21
## Example
18
22
19
- For a realistic example of what a Hasura GraphQL schema looks like, check out
23
+ For a realistic example of what a Hasura GraphQL schema looks like, check out
20
24
our example [ ** SDL file** ] [ sdl-file ] (Schema Definition Language).
21
25
22
26
[ sdl-file ] : ./examples/hasura.sdl.graphqls
@@ -25,7 +29,7 @@ our example [**SDL file**][sdl-file] (Schema Definition Language).
25
29
26
30
### Installing
27
31
28
- Eventually, I may package this up in Tea and maybe even Homebrew (via
32
+ Eventually, I may package this up in Tea and maybe even Homebrew (via
29
33
[ Goreleaser] [ goreleaser-brew ] ).
30
34
31
35
For the time being, it should be installable with Go:
@@ -87,5 +91,6 @@ go build -v -trimpath -ldflags="-s -w" -o ./bin/graphql-schema-picker ./cmd/grap
87
91
Create a new Git tag
88
92
89
93
``` shell
90
- git tag -a $( svu next) -m " $( svu next) "
91
- ```
94
+ sh <( curl https://tea.xyz) +github.com/caarlos0/svu \
95
+ git tag -a $( svu next) -m " $( svu next) "
96
+ ```
0 commit comments