Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt authored and Johny Jose committed Sep 16, 2017
1 parent 6e2c498 commit 5a85ccc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions executor.go
Expand Up @@ -1481,10 +1481,7 @@ func (executor *Executor) resolveFieldOnObject(reqCtx *RequestContext, objectTyp
}

if sourceValKind == reflect.Struct {
// find field based on struct's json tag
// we could potentially create a custom `graphql` tag, but its unnecessary at this point
// since graphql speaks to client in a json-like way anyway
// so json tags are a good way to start with
// find field based on struct's graphql tag, with fallback to json tag
for i := 0; i < sourceVal.NumField(); i++ {
valueField := sourceVal.Field(i)
typeField := sourceValType.Field(i)
Expand Down

0 comments on commit 5a85ccc

Please sign in to comment.