code: func completeObjectValue(eCtx *executionContext, returnType *Object, fieldASTs []*ast.Field, info ResolveInfo, path *ResponsePath, result interface{}) interface{} {
  
  	// If there is an isTypeOf predicate function, call it with the
  	// current result. If isTypeOf returns false, then raise an error rather
  	// than continuing execution.
  	if returnType.IsTypeOf != nil {
  		p := IsTypeOfParams{
  			Value:   result,
  			Info:    info,
  			Context: eCtx.Context,
  		}
  		if !returnType.IsTypeOf(p) {
  			panic(gqlerrors.NewFormattedError(
  				fmt.Sprintf(`Expected value of type "%v" but got: %T.`, returnType, result),
  			))
  		}
  	}
  
  	// Collect sub-fields to execute to complete this value.
  	subFieldASTs := map[string][]*ast.Field{}
  	visitedFragmentNames := map[string]bool{}
  	for _, fieldAST := range fieldASTs {
  		if fieldAST == nil {
  			continue
  		}
  		selectionSet := fieldAST.SelectionSet
  		if selectionSet != nil {
  			innerParams := collectFieldsParams{
  				ExeContext:           eCtx,
  				RuntimeType:          returnType,
  				SelectionSet:         selectionSet,
  				Fields:               subFieldASTs,
  				VisitedFragmentNames: visitedFragmentNames,
  			}
  			subFieldASTs = collectFields(innerParams)
  		}
  	}
  	executeFieldsParams := executeFieldsParams{
  		ExecutionContext: eCtx,
  		ParentType:       returnType,
  		Source:           result,
  		Fields:           subFieldASTs,
  		Path:             path,
  	}
  	return executeSubFields(executeFieldsParams)
  }
docs: // completeObjectValue complete an Object value by executing all sub-selections.