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

Commit 425db37

Browse files
authored
Merge pull request #23 from Code-Hex/fix/type-mapping
fixed type mapping logic
2 parents 661241b + 3ed453c commit 425db37

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@ require (
77
github.com/agnivade/levenshtein v1.1.0 // indirect
88
github.com/goccy/go-yaml v1.8.9
99
github.com/google/go-cmp v0.5.5
10-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393 // indirect
10+
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393
1111
github.com/machinebox/graphql v0.2.2
1212
github.com/matryer/is v1.4.0 // indirect
1313
github.com/mattn/go-zglob v0.0.3
1414
github.com/pkg/errors v0.8.1
1515
github.com/russross/blackfriday/v2 v2.1.0
1616
github.com/urfave/cli/v2 v2.3.0
17-
github.com/vektah/gqlparser/v2 v2.1.0
1817
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
1918
)

go.sum

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
3535
github.com/gorilla/context v0.0.0-20160226214623-1ea25387ff6f/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
3636
github.com/gorilla/mux v1.6.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
3737
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
38-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210404043438-758ac252308a h1:IzMV22Hitzxqb71um5i64jEJTyeUVwemK8JmcQdgpA4=
39-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210404043438-758ac252308a/go.mod h1:0sYgRh/Er/ZhHrcKw516TOX4K0ul94vKcBSXAPhLWDc=
40-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406023454-534efe0eae8e h1:dF5TaS3uw9LA8e75LojnUmnHdhfw1I1ScV9Qy1Stuu8=
41-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406023454-534efe0eae8e/go.mod h1:0sYgRh/Er/ZhHrcKw516TOX4K0ul94vKcBSXAPhLWDc=
42-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406143310-243d3ee28500 h1:MU4UNUZ+6KtOt1Kv6AQSefKvSW+6mNoZfrX+A8y82yc=
43-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210406143310-243d3ee28500/go.mod h1:tcoG4afq1O8aR/IjCYadz/CWSie6ouAQYfoAPoNqdmA=
44-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410035123-2a4e628b7612 h1:9n+WVGphaTd6j10xqUQ6NdQGKy2mhdyEtxWDF+OYfkI=
45-
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410035123-2a4e628b7612/go.mod h1:qU2DZu18blZvWc+6KoEbeTJy5PT2jav/rO1byy47iRU=
4638
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393 h1:85IH4c5AH0yzTlC6OA6t33jF3B8oK3hOEoBOOvrXxu8=
4739
github.com/gqlgo/gqlparser/v2 v2.1.1-0.20210410045713-c9e512f85393/go.mod h1:qU2DZu18blZvWc+6KoEbeTJy5PT2jav/rO1byy47iRU=
4840
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=

internal/introspection/introspection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (s *Schema) UnmarshalJSON(data []byte) error {
177177
// Make a memo
178178
memoizeTypes := make(map[string]*Types, len(s.Types))
179179
mid := len(s.Types) / 2
180-
for i, j := 0, len(schema.Types)-1; i < mid; i, j = i+1, j-1 {
180+
for i, j := 0, len(schema.Types)-1; i <= mid; i, j = i+1, j-1 {
181181
memoizeTypes[schema.Types[i].Name] = schema.Types[i]
182182
memoizeTypes[schema.Types[j].Name] = schema.Types[j]
183183
}

0 commit comments

Comments
 (0)