private async Task ExecuteObjectsSelectionSubsetAsync(IList <OutputObjectScope> parentScopes,
                                                              ObjectTypeDef objTypeDef, SelectionSubset subSet)
        {
            var outItemSet   = subSet.MappedItemSets.FirstOrDefault(fi => fi.ObjectTypeDef == objTypeDef);
            var mappedFields = _requestContext.GetIncludedMappedFields(outItemSet);

            // init scopes
            foreach (var scope in parentScopes)
            {
                scope.Init(objTypeDef, mappedFields);
            }

            for (int fldIndex = 0; fldIndex < mappedFields.Count; fldIndex++)
            {
                var mappedField        = mappedFields[fldIndex];
                var returnsComplexType = mappedField.FieldDef.Flags.IsSet(FieldFlags.ReturnsComplexType);
                var fieldContext       = new FieldContext(_requestContext, this, mappedField, fldIndex, parentScopes);
                foreach (var scope in fieldContext.AllParentScopes)
                {
                    if (fieldContext.BatchResultWasSet && scope.HasValue(fldIndex))
                    {
                        continue;
                    }
                    fieldContext.CurrentScope = scope;
                    object result = null;
                    switch (mappedField.FieldDef.ExecutionType)
                    {
                    case FieldExecutionType.Reader:
                        result = InvokeFieldReader(fieldContext, fieldContext.CurrentScope.Entity);
                        break;

                    case FieldExecutionType.Resolver:
                        result = await InvokeResolverAsync(fieldContext);

                        break;
                    }
                    var outValue = fieldContext.ConvertToOuputValue(result);
                    if (!fieldContext.BatchResultWasSet)
                    {
                        scope.SetValue(fldIndex, outValue);
                    }
                } //foreach scope
                // if there are any non-null object-type results, add this field context to this special list
                //   to execute selection subsets in the next round.
                if (returnsComplexType && fieldContext.AllResultScopes.Count > 0)
                {
                    _executedObjectFieldContexts.Add(fieldContext);
                }
            } //foreach fldIndex
        }     //method
        public async Task ExecuteOperationFieldAsync()
        {
            try {
                var opFieldContext = new FieldContext(_requestContext, this, _operationField, _fieldIndex);
                opFieldContext.CurrentScope = _parentScope;
                var result = await InvokeResolverAsync(opFieldContext);

                var opOutValue = opFieldContext.ConvertToOuputValue(result);
                _parentScope.SetValue(_fieldIndex, opOutValue);
                // for fields returning objects, save for further processing of results
                if (opFieldContext.Flags.IsSet(FieldFlags.ReturnsComplexType))
                {
                    _executedObjectFieldContexts.Add(opFieldContext);
                }

                // process object field results until no more
                while (_executedObjectFieldContexts.Count > 0)
                {
                    if (_requestContext.CancellationToken.IsCancellationRequested)
                    {
                        opFieldContext.ThrowRequestCancelled();
                    }
                    // save current list, create new one in the field
                    var oldFieldContexts = _executedObjectFieldContexts;
                    _executedObjectFieldContexts = new List <FieldContext>();
                    foreach (var fldCtx in oldFieldContexts)
                    {
                        await ExecuteFieldSelectionSubsetAsync(fldCtx);
                    }
                }//while
            } finally {
                // notify resolvers about end request
                if (_resolverInstances.Count > 0)
                {
                    foreach (var resObj in _resolverInstances)
                    {
                        (resObj as IResolverClass)?.EndRequest(_requestContext);
                    }
                }
            }
        }