From 5a85ccc82dbcc910fac04dd6114be9fe2b98b40a Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Thu, 3 Aug 2017 21:21:06 +0200 Subject: [PATCH] update comment --- executor.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/executor.go b/executor.go index d24cdf6..dde99c7 100644 --- a/executor.go +++ b/executor.go @@ -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)