Skip to content

Commit f50ffba

Browse files
committed
Working implementation
1 parent 6157463 commit f50ffba

24 files changed

+516
-341
lines changed

.env.example

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
GRAPHQL_TYPEDEF_DEBUG=false
3-
GRAPHQL_TYPEDEF_OUTPUT_DIRECTORY=internal/graphqltypes
4-
GRAPHQL_TYPEDEF_OUTPUT_PACKAGE=graphqltypes
5-
GRAPHQL_TYPEDEF_GRAPHQL_ENDPOINT=http://localhost:5000/v1/graphql
6-
GRAPHQL_TYPEDEF_GRAPHQL_AUTH_HEADER=x-hasura-admin-secret
7-
GRAPHQL_TYPEDEF_GRAPHQL_AUTH_TOKEN=
2+
GQLASSIST_DEBUG=false
3+
GQLASSIST_OUTPUT_DIRECTORY=internal/graphqltypes
4+
GQLASSIST_OUTPUT_PACKAGE=graphqltypes
5+
GQLASSIST_GRAPHQL_ENDPOINT=http://localhost:5000/v1/graphql
6+
GQLASSIST_GRAPHQL_AUTH_HEADER=x-hasura-admin-secret
7+
GQLASSIST_GRAPHQL_AUTH_TOKEN=

README.md

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
1-
# graphql-typedef-go
2-
Golang type definitions generator for consuming GraphQL server resources.
1+
GQLAssist
2+
===
3+
4+
> [GQLAssist][project-github] is a **client-side** [GraphQL][link-graphql] struct and type definitions generator for [Go][link-golang] programming language.
35
46
## Installation
57

68
```bash
7-
go get -u github.com/shakahl/graphql-typedef-go
9+
go get -u github.com/shakahl/gqlassist
810
```
911

12+
## License
13+
14+
[GQLAssist][project-github] is distributed under the MIT license. See also LICENSE.
15+
16+
17+
[project-github]: https://github.com/shakahl/gqlassist "shakahl/gqlassist"
18+
[link-golang]: https://golang.org "Go"
19+
[link-graphql]: https://graphql.org/ "GraphQL"

assets/IntrospectionQuery.graphql

Whitespace-only changes.

assets/templates/instrospect.graphql assets/templates/IntrospectionQuery.graphql

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
# GraphQL Query: IntrospectionQuery - Defines the query to fetch GraphQL server's schema in JSON-friendly AST
23
query IntrospectionQuery {
34
__schema {
45
queryType { name }

assets/templates/gen_graphql_enums.gotmpl assets/templates/graphql_enums.gotmpl

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
// Code generated by gen.go; DO NOT EDIT.
1+
{{- .FileHeader }}
22

3-
package {{ pkgname }}
3+
package {{ .PackageName }}
44

55
import (
6-
"bytes"
7-
"encoding/json"
8-
"strings"
9-
// "fmt"
6+
"bytes"
7+
"encoding/json"
8+
"strings"
9+
// "fmt"
1010
)
1111

12-
{{range .data.__schema.types | filterBy "kind" "ENUM" | sortByName}}{{if and (eq .kind "ENUM") (not (isExcluded .name))}}
13-
{{template "enum" .}}
14-
{{end}}{{end}}
12+
{{ range .Schema.data.__schema.types | filterBy "kind" "ENUM" | sortByName }}
13+
{{- if and (eq .kind "ENUM") (not (isExcluded .name)) -}}
14+
{{- template "enum" . -}}
15+
{{- end -}}
16+
{{ end }}
1517

1618

1719
{{- define "enum" -}}
@@ -110,3 +112,4 @@ import (
110112
}
111113

112114
{{- end -}}
115+

assets/templates/gen_graphql_input_objects.gotmpl assets/templates/graphql_input_objects.gotmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Code generated by gen.go; DO NOT EDIT.
1+
{{- .FileHeader }}
22

3-
package {{ pkgname }}
3+
package {{ .PackageName }}
44

55
import (
66
"time"
@@ -10,24 +10,24 @@ import (
1010

1111
// Input represents one of the Input structs:
1212
//
13-
// {{join (extractField "name" (filterBy "kind" "INPUT_OBJECT" .data.__schema.types)) ", "}}.
13+
// {{join (extractField "name" (filterBy "kind" "INPUT_OBJECT" .Schema.data.__schema.types)) ", "}}.
1414

1515
type Input interface{}
1616

1717
var (
1818
TypeMapInputObjects = map[string]string{
19-
{{ range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{if eq .kind "INPUT_OBJECT" -}}
19+
{{ range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{if eq .kind "INPUT_OBJECT" -}}
2020
{{ .name | identifier | quote }}: {{ .name | quote }},
2121
{{ end }}{{- end }}
2222
}
2323
ReverseTypeMapInputObjects = map[string]string{
24-
{{ range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{ if eq .kind "INPUT_OBJECT" -}}
24+
{{ range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{ if eq .kind "INPUT_OBJECT" -}}
2525
{{ .name | quote }}: {{ .name | identifier| quote }},
2626
{{ end }}{{- end }}
2727
}
2828
)
2929

30-
{{range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName}}{{if eq .kind "INPUT_OBJECT"}}
30+
{{range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName}}{{if eq .kind "INPUT_OBJECT"}}
3131
{{template "inputObject" .}}
3232
{{end}}{{end}}
3333

assets/templates/gen_graphql_objects.gotmpl assets/templates/graphql_objects.gotmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Code generated by gen.go; DO NOT EDIT.
1+
{{- .FileHeader }}
22

3-
package {{ pkgname }}
3+
package {{ .PackageName }}
44

55
import (
66
"time"
@@ -10,7 +10,7 @@ import (
1010

1111
// Object represents one of the Input structs:
1212
//
13-
// {{join (extractField "name" (filterBy "kind" "OBJECT" .data.__schema.types)) ", "}}.
13+
// {{join (extractField "name" (filterBy "kind" "OBJECT" .Schema.data.__schema.types)) ", "}}.
1414

1515
type Object interface{}
1616

@@ -21,18 +21,18 @@ GQLTypeName *string ` + "`" + `json:"__typename,omitempty"` + "`" + `
2121

2222
var (
2323
TypeMapObjects = map[string]string{
24-
{{ range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{if eq .kind "OBJECT" -}}
24+
{{ range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{if eq .kind "OBJECT" -}}
2525
{{ .name | identifier | quote }}: {{ .name | quote }},
2626
{{ end }}{{- end }}
2727
}
2828
ReverseTypeMapObjects = map[string]string{
29-
{{ range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{ if eq .kind "OBJECT" -}}
29+
{{ range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{ if eq .kind "OBJECT" -}}
3030
{{ .name | quote }}: {{ .name | identifier| quote }},
3131
{{ end }}{{- end }}
3232
}
3333
)
3434

35-
{{range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName}}{{if eq .kind "OBJECT"}}
35+
{{range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName}}{{if eq .kind "OBJECT"}}
3636
{{template "object" .}}
3737
{{end}}{{end}}
3838

assets/templates/gen_graphql_scalars.gotmpl assets/templates/graphql_scalars.gotmpl

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
// Code generated by gen.go; DO NOT EDIT.
1+
{{- .FileHeader }}
22

3-
package {{ pkgname }}
3+
package {{ .PackageName }}
44

55
import (
6-
"time"
6+
"time"
77

8-
"github.com/google/uuid"
8+
"github.com/google/uuid"
99
)
1010

11-
{{ if false -}}
11+
{{ if false }}
1212
type (
1313
// Boolean represents true or false values.
1414
Boolean bool
@@ -50,19 +50,19 @@ import (
5050

5151
// NewString is a helper to make a new *String.
5252
func NewString(v String) *String { return &v }
53-
{{- end }}
53+
{{ end -}}
5454

55-
{{ range .data.__schema.types | filterBy "kind" "SCALAR" | sortByName -}}
55+
{{ range .Schema.data.__schema.types | filterBy "kind" "SCALAR" | sortByName -}}
5656
{{- if and (eq .kind "SCALAR") (not (isExcluded .name)) -}}
5757
{{- template "scalar" . -}}
58-
{{- end -}}
59-
{{- end }}
58+
{{- end -}}{{- end }}
6059

6160
{{- define "scalar" -}}
6261
// {{ .name | scalarIdentifier }} @graphql="{{ .name }}" {{if .description}}{{.description | clean | formatDescription}}{{end}}
6362
type {{ .name | scalarIdentifier }} {{ .name | scalarType }}
6463

6564
// New{{ .name | scalarIdentifier }} is a helper to make a new *{{ .name | scalarIdentifier }}.
6665
func New{{ .name | scalarIdentifier }}(v {{ .name | scalarIdentifier }}) *{{ .name | scalarIdentifier }} { return &v }
66+
6767
{{ end -}}
6868

cmd/generate.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
"github.com/spf13/cobra"
88

9-
"github.com/shakahl/graphql-typedef-go/internal/config"
10-
"github.com/shakahl/graphql-typedef-go/internal/generator"
9+
"github.com/shakahl/gqlassist/internal/config"
10+
"github.com/shakahl/gqlassist/internal/gqlassist"
1111
)
1212

1313
// generateCmd represents the "generate" command
@@ -20,15 +20,15 @@ var generateCmd = &cobra.Command{
2020
logger := log.New(os.Stdout, "graphql_type_def_generator", log.LstdFlags|log.LUTC)
2121
cfg := config.Get()
2222

23-
gopts := generator.GraphQLTypeDefGeneratorOptions{
23+
gopts := gqlassist.GraphQLTypeDefGeneratorConfig{
2424
Endpoint: cfg.GraphQLEndpoint,
2525
AuthHeader: cfg.GraphQLAuthHeader,
2626
AuthToken: cfg.GraphQLAuthToken,
2727
OutputDirectory: cfg.OutputDirectory,
2828
OutputPackage: cfg.OutputPackage,
2929
}
3030

31-
gen := generator.New(gopts, logger)
31+
gen := gqlassist.New(gopts, logger)
3232

3333
if err := gen.Generate(); err != nil {
3434
logger.Fatalln(err)

cmd/init.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/spf13/cobra"
88

9-
"github.com/shakahl/graphql-typedef-go/internal/config"
9+
"github.com/shakahl/gqlassist/internal/config"
1010
)
1111

1212
// initCmd represents the "generate" command

cmd/root.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99

1010
"github.com/spf13/viper"
1111

12-
"github.com/shakahl/graphql-typedef-go/internal/config"
13-
"github.com/shakahl/graphql-typedef-go/internal/utils"
14-
"github.com/shakahl/graphql-typedef-go/meta"
12+
"github.com/shakahl/gqlassist/internal/config"
13+
"github.com/shakahl/gqlassist/internal/utils"
14+
"github.com/shakahl/gqlassist/meta"
1515
)
1616

1717
var cfgFile string

go.mod

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
module github.com/shakahl/graphql-typedef-go
1+
module github.com/shakahl/gqlassist
22

33
go 1.15
44

55
require (
6+
github.com/Masterminds/goutils v1.1.0 // indirect
7+
github.com/Masterminds/semver v1.5.0 // indirect
8+
github.com/Masterminds/sprig v2.22.0+incompatible
9+
github.com/google/uuid v1.1.2 // indirect
10+
github.com/huandu/xstrings v1.3.2 // indirect
11+
github.com/imdario/mergo v0.3.11 // indirect
612
github.com/joho/godotenv v1.3.0
713
github.com/kelseyhightower/envconfig v1.4.0
14+
github.com/mitchellh/copystructure v1.0.0 // indirect
815
github.com/mitchellh/go-homedir v1.1.0
916
github.com/pkg/errors v0.8.1
17+
github.com/rakyll/statik v0.1.7
1018
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f
1119
github.com/spf13/cobra v1.0.0
1220
github.com/spf13/pflag v1.0.3

go.sum

+21
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
1313
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
1414
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
1515
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
16+
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
17+
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
18+
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
19+
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
20+
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
21+
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
1622
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
1723
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
1824
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -65,6 +71,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
6571
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
6672
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
6773
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
74+
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
75+
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
6876
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
6977
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
7078
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -94,6 +102,10 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
94102
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
95103
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
96104
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
105+
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
106+
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
107+
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
108+
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
97109
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
98110
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
99111
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
@@ -120,6 +132,8 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
120132
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
121133
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
122134
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
135+
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
136+
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
123137
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
124138
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
125139
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@@ -129,6 +143,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
129143
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
130144
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
131145
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
146+
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
147+
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
132148
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
133149
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
134150
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
@@ -150,6 +166,8 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
150166
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
151167
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
152168
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
169+
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
170+
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
153171
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
154172
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
155173
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -196,6 +214,7 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
196214
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
197215
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
198216
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
217+
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU=
199218
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
200219
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
201220
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -311,6 +330,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
311330
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
312331
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
313332
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
333+
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
334+
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
314335
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
315336
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
316337
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

internal/config/config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ import (
1414
"github.com/spf13/viper"
1515

1616
"github.com/kelseyhightower/envconfig"
17-
"github.com/shakahl/graphql-typedef-go/internal/utils"
18-
"github.com/shakahl/graphql-typedef-go/meta"
17+
"github.com/shakahl/gqlassist/internal/utils"
18+
"github.com/shakahl/gqlassist/meta"
1919
)
2020

2121
const (
22-
EnvPrefix = "GRAPHQL_TYPEDEF"
22+
EnvPrefix = "GQLASSIST"
2323
)
2424

2525
var (

internal/config/schema.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package config
33
import (
44
"errors"
55

6-
"github.com/shakahl/graphql-typedef-go/internal/utils"
6+
"github.com/shakahl/gqlassist/internal/utils"
77
)
88

99
const (

0 commit comments

Comments
 (0)