示例#1
0
 private static object CompleteResolverResult(
     FieldNode fieldSelection,
     IResolverResult resolverResult)
 {
     if (resolverResult.IsError)
     {
         return(new FieldError(
                    resolverResult.ErrorMessage,
                    fieldSelection));
     }
     return(resolverResult.Value);
 }
示例#2
0
        public async ValueTask EndResolveAsync(IResolverContext context, IResolverResult result)
        {
            foreach (var extension in _scopes)
            {
                var task = extension.EndResolveAsync(context, result);

                if (task.IsCompletedSuccessfully)
                {
                    continue;
                }

                await task;
            }
        }