Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.

fixed type mapping logic #23

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ require (
github.com/agnivade/levenshtein v1.1.0 // indirect
github.com/goccy/go-yaml v1.8.9
github.com/google/go-cmp v0.5.5
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393 // indirect
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393
github.com/machinebox/graphql v0.2.2
github.com/matryer/is v1.4.0 // indirect
github.com/mattn/go-zglob v0.0.3
github.com/pkg/errors v0.8.1
github.com/russross/blackfriday/v2 v2.1.0
github.com/urfave/cli/v2 v2.3.0
github.com/vektah/gqlparser/v2 v2.1.0
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
)
8 changes: 0 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210404043438-758ac252308a h1:IzMV22Hitzxqb71um5i64jEJTyeUVwemK8JmcQdgpA4=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210404043438-758ac252308a/go.mod h1:0sYgRh/Er/ZhHrcKw516TOX4K0ul94vKcBSXAPhLWDc=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406023454-534efe0eae8e h1:dF5TaS3uw9LA8e75LojnUmnHdhfw1I1ScV9Qy1Stuu8=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406023454-534efe0eae8e/go.mod h1:0sYgRh/Er/ZhHrcKw516TOX4K0ul94vKcBSXAPhLWDc=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406143310-243d3ee28500 h1:MU4UNUZ+6KtOt1Kv6AQSefKvSW+6mNoZfrX+A8y82yc=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406143310-243d3ee28500/go.mod h1:tcoG4afq1O8aR/IjCYadz/CWSie6ouAQYfoAPoNqdmA=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410035123-2a4e628b7612 h1:9n+WVGphaTd6j10xqUQ6NdQGKy2mhdyEtxWDF+OYfkI=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410035123-2a4e628b7612/go.mod h1:qU2DZu18blZvWc+6KoEbeTJy5PT2jav/rO1byy47iRU=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393 h1:85IH4c5AH0yzTlC6OA6t33jF3B8oK3hOEoBOOvrXxu8=
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393/go.mod h1:qU2DZu18blZvWc+6KoEbeTJy5PT2jav/rO1byy47iRU=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
Expand Down
2 changes: 1 addition & 1 deletion internal/introspection/introspection.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (s *Schema) UnmarshalJSON(data []byte) error {
// Make a memo
memoizeTypes := make(map[string]*Types, len(s.Types))
mid := len(s.Types) / 2
for i, j := 0, len(schema.Types)-1; i < mid; i, j = i+1, j-1 {
for i, j := 0, len(schema.Types)-1; i <= mid; i, j = i+1, j-1 {
memoizeTypes[schema.Types[i].Name] = schema.Types[i]
memoizeTypes[schema.Types[j].Name] = schema.Types[j]
}
Expand Down