public static IFieldDescriptor Resolver <TResult>( this IFieldDescriptor descriptor, Func <Task <TResult> > fieldResolver) { return(descriptor.Type(typeof(TResult), false) .Resolver((ctx, ct) => fieldResolver())); }
public static IFieldDescriptor Resolver <TResult>( this IFieldDescriptor descriptor, Func <IResolverContext, TResult> fieldResolver) { return(descriptor .Type <NativeType <TResult> >() .Resolver((ctx, ct) => fieldResolver(ctx), typeof(NativeType <TResult>))); }