Created
July 7, 2020 16:36
-
-
Save Yatekii/b62f3964782b08a26261fcf617e7b65a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ResolveFieldContext<TSource> | |
{ | |
public ResolveFieldContext(); | |
public ResolveFieldContext(ResolveFieldContext context); | |
public ExecutionErrors Errors { get; set; } | |
public Metrics Metrics { get; set; } | |
public CancellationToken CancellationToken { get; set; } | |
public Variables Variables { get; set; } | |
public Fragments Fragments { get; set; } | |
public Operation Operation { get; set; } | |
public Document Document { get; set; } | |
public ISchema Schema { get; set; } | |
public TSource Source { get; set; } | |
public object UserContext { get; set; } | |
public object RootValue { get; set; } | |
public Dictionary<string, object> Arguments { get; set; } | |
public IObjectGraphType ParentType { get; set; } | |
public IGraphType ReturnType { get; set; } | |
public FieldType FieldDefinition { get; set; } | |
public Language.AST.Field FieldAst { get; set; } | |
public string FieldName { get; set; } | |
public IEnumerable<string> Path { get; set; } | |
public IDictionary<string, Language.AST.Field> SubFields { get; set; } | |
public object GetArgument(System.Type argumentType, string name, object defaultValue = null); | |
public TType GetArgument<TType>(string name, TType defaultValue = default); | |
public bool HasArgument(string argumentName); | |
[AsyncStateMachine(typeof(ResolveFieldContext<>.<TryAsyncResolve>d__82<>))] | |
public Task<TResult> TryAsyncResolve<TResult>(Func<ResolveFieldContext<TSource>, Task<TResult>> resolve, Func<ExecutionErrors, Task<TResult>> error = null); | |
public Task<object> TryAsyncResolve(Func<ResolveFieldContext<TSource>, Task<object>> resolve, Func<ExecutionErrors, Task<object>> error = null); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private Probe ResolveProbe(ResolveFieldContext context) | |
{ | |
var probe = context.Source as Probe; | |
return context.Source as Probe; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment