Skip to content

Commit

Permalink
Working implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
shakahl committed Oct 24, 2020
1 parent 6157463 commit f50ffba
Show file tree
Hide file tree
Showing 24 changed files with 516 additions and 341 deletions.
12 changes: 6 additions & 6 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

GRAPHQL_TYPEDEF_DEBUG=false
GRAPHQL_TYPEDEF_OUTPUT_DIRECTORY=internal/graphqltypes
GRAPHQL_TYPEDEF_OUTPUT_PACKAGE=graphqltypes
GRAPHQL_TYPEDEF_GRAPHQL_ENDPOINT=http://localhost:5000/v1/graphql
GRAPHQL_TYPEDEF_GRAPHQL_AUTH_HEADER=x-hasura-admin-secret
GRAPHQL_TYPEDEF_GRAPHQL_AUTH_TOKEN=
GQLASSIST_DEBUG=false
GQLASSIST_OUTPUT_DIRECTORY=internal/graphqltypes
GQLASSIST_OUTPUT_PACKAGE=graphqltypes
GQLASSIST_GRAPHQL_ENDPOINT=http://localhost:5000/v1/graphql
GQLASSIST_GRAPHQL_AUTH_HEADER=x-hasura-admin-secret
GQLASSIST_GRAPHQL_AUTH_TOKEN=
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
# graphql-typedef-go
Golang type definitions generator for consuming GraphQL server resources.
GQLAssist
===

> [GQLAssist][project-github] is a **client-side** [GraphQL][link-graphql] struct and type definitions generator for [Go][link-golang] programming language.
## Installation

```bash
go get -u github.com/shakahl/graphql-typedef-go
go get -u github.com/shakahl/gqlassist
```

## License

[GQLAssist][project-github] is distributed under the MIT license. See also LICENSE.


[project-github]: https://github.com/shakahl/gqlassist "shakahl/gqlassist"
[link-golang]: https://golang.org "Go"
[link-graphql]: https://graphql.org/ "GraphQL"
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

# GraphQL Query: IntrospectionQuery - Defines the query to fetch GraphQL server's schema in JSON-friendly AST
query IntrospectionQuery {
__schema {
queryType { name }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
// Code generated by gen.go; DO NOT EDIT.
{{- .FileHeader }}

package {{ pkgname }}
package {{ .PackageName }}

import (
"bytes"
"encoding/json"
"strings"
// "fmt"
"bytes"
"encoding/json"
"strings"
// "fmt"
)

{{range .data.__schema.types | filterBy "kind" "ENUM" | sortByName}}{{if and (eq .kind "ENUM") (not (isExcluded .name))}}
{{template "enum" .}}
{{end}}{{end}}
{{ range .Schema.data.__schema.types | filterBy "kind" "ENUM" | sortByName }}
{{- if and (eq .kind "ENUM") (not (isExcluded .name)) -}}
{{- template "enum" . -}}
{{- end -}}
{{ end }}


{{- define "enum" -}}
Expand Down Expand Up @@ -110,3 +112,4 @@ import (
}

{{- end -}}

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

package {{ pkgname }}
package {{ .PackageName }}

import (
"time"
Expand All @@ -10,24 +10,24 @@ import (

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

type Input interface{}

var (
TypeMapInputObjects = map[string]string{
{{ range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{if eq .kind "INPUT_OBJECT" -}}
{{ range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{if eq .kind "INPUT_OBJECT" -}}
{{ .name | identifier | quote }}: {{ .name | quote }},
{{ end }}{{- end }}
}
ReverseTypeMapInputObjects = map[string]string{
{{ range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{ if eq .kind "INPUT_OBJECT" -}}
{{ range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName -}}{{ if eq .kind "INPUT_OBJECT" -}}
{{ .name | quote }}: {{ .name | identifier| quote }},
{{ end }}{{- end }}
}
)

{{range .data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName}}{{if eq .kind "INPUT_OBJECT"}}
{{range .Schema.data.__schema.types | filterBy "kind" "INPUT_OBJECT" | sortByName}}{{if eq .kind "INPUT_OBJECT"}}
{{template "inputObject" .}}
{{end}}{{end}}

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

package {{ pkgname }}
package {{ .PackageName }}

import (
"time"
Expand All @@ -10,7 +10,7 @@ import (

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

type Object interface{}

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

var (
TypeMapObjects = map[string]string{
{{ range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{if eq .kind "OBJECT" -}}
{{ range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{if eq .kind "OBJECT" -}}
{{ .name | identifier | quote }}: {{ .name | quote }},
{{ end }}{{- end }}
}
ReverseTypeMapObjects = map[string]string{
{{ range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{ if eq .kind "OBJECT" -}}
{{ range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName -}}{{ if eq .kind "OBJECT" -}}
{{ .name | quote }}: {{ .name | identifier| quote }},
{{ end }}{{- end }}
}
)

{{range .data.__schema.types | filterBy "kind" "OBJECT" | sortByName}}{{if eq .kind "OBJECT"}}
{{range .Schema.data.__schema.types | filterBy "kind" "OBJECT" | sortByName}}{{if eq .kind "OBJECT"}}
{{template "object" .}}
{{end}}{{end}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Code generated by gen.go; DO NOT EDIT.
{{- .FileHeader }}

package {{ pkgname }}
package {{ .PackageName }}

import (
"time"
"time"

"github.com/google/uuid"
"github.com/google/uuid"
)

{{ if false -}}
{{ if false }}
type (
// Boolean represents true or false values.
Boolean bool
Expand Down Expand Up @@ -50,19 +50,19 @@ import (

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

{{ range .data.__schema.types | filterBy "kind" "SCALAR" | sortByName -}}
{{ range .Schema.data.__schema.types | filterBy "kind" "SCALAR" | sortByName -}}
{{- if and (eq .kind "SCALAR") (not (isExcluded .name)) -}}
{{- template "scalar" . -}}
{{- end -}}
{{- end }}
{{- end -}}{{- end }}

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

// New{{ .name | scalarIdentifier }} is a helper to make a new *{{ .name | scalarIdentifier }}.
func New{{ .name | scalarIdentifier }}(v {{ .name | scalarIdentifier }}) *{{ .name | scalarIdentifier }} { return &v }

{{ end -}}

8 changes: 4 additions & 4 deletions cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/spf13/cobra"

"github.com/shakahl/graphql-typedef-go/internal/config"
"github.com/shakahl/graphql-typedef-go/internal/generator"
"github.com/shakahl/gqlassist/internal/config"
"github.com/shakahl/gqlassist/internal/gqlassist"
)

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

gopts := generator.GraphQLTypeDefGeneratorOptions{
gopts := gqlassist.GraphQLTypeDefGeneratorConfig{
Endpoint: cfg.GraphQLEndpoint,
AuthHeader: cfg.GraphQLAuthHeader,
AuthToken: cfg.GraphQLAuthToken,
OutputDirectory: cfg.OutputDirectory,
OutputPackage: cfg.OutputPackage,
}

gen := generator.New(gopts, logger)
gen := gqlassist.New(gopts, logger)

if err := gen.Generate(); err != nil {
logger.Fatalln(err)
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/spf13/cobra"

"github.com/shakahl/graphql-typedef-go/internal/config"
"github.com/shakahl/gqlassist/internal/config"
)

// initCmd represents the "generate" command
Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/spf13/viper"

"github.com/shakahl/graphql-typedef-go/internal/config"
"github.com/shakahl/graphql-typedef-go/internal/utils"
"github.com/shakahl/graphql-typedef-go/meta"
"github.com/shakahl/gqlassist/internal/config"
"github.com/shakahl/gqlassist/internal/utils"
"github.com/shakahl/gqlassist/meta"
)

var cfgFile string
Expand Down
10 changes: 9 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
module github.com/shakahl/graphql-typedef-go
module github.com/shakahl/gqlassist

go 1.15

require (
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/Masterminds/sprig v2.22.0+incompatible
github.com/google/uuid v1.1.2 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/joho/godotenv v1.3.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.8.1
github.com/rakyll/statik v0.1.7
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f
github.com/spf13/cobra v1.0.0
github.com/spf13/pflag v1.0.3
Expand Down
21 changes: 21 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60=
github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
Expand Down Expand Up @@ -65,6 +71,8 @@ github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXi
github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
Expand Down Expand Up @@ -94,6 +102,10 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
Expand All @@ -120,6 +132,8 @@ github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand All @@ -129,6 +143,8 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
Expand All @@ -150,6 +166,8 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ=
github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
Expand Down Expand Up @@ -196,6 +214,7 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5 h1:58fnuSXlxZmFdJyvtTFVmVhcMLU6v5fEb/ok4wyqtNU=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -311,6 +330,8 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
6 changes: 3 additions & 3 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ import (
"github.com/spf13/viper"

"github.com/kelseyhightower/envconfig"
"github.com/shakahl/graphql-typedef-go/internal/utils"
"github.com/shakahl/graphql-typedef-go/meta"
"github.com/shakahl/gqlassist/internal/utils"
"github.com/shakahl/gqlassist/meta"
)

const (
EnvPrefix = "GRAPHQL_TYPEDEF"
EnvPrefix = "GQLASSIST"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion internal/config/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package config
import (
"errors"

"github.com/shakahl/graphql-typedef-go/internal/utils"
"github.com/shakahl/gqlassist/internal/utils"
)

const (
Expand Down
Loading

0 comments on commit f50ffba

Please sign in to comment.