// this is just a test placeholder public bool Subscribe(IFieldContext context, string childName) { return(true); }
public string EchoIntListRank2(IFieldContext context, int[][] values) { var all = values[0].Union(values[1]).ToList(); return(string.Join(",", all)); }
public ThingKind[] GetAllKinds(IFieldContext context) { return(new[] { ThingKind.KindOne, ThingKind.KindTwo, ThingKind.KindThree }); }
public Expression ShouldSkipFieldExpression(IFieldContext context) => Expression.Call( FormatterExpression(), _itemFormatterType.GetMethod("ShouldSkipField"), GetItemExpression(context));
public Expression SerializeFieldExpression(IFieldContext context) => Expression.Call( FormatterExpression(), _itemFormatterType.GetMethod("Serialize"), context.FillFieldListParams.DataStream, GetItemExpression(context));
public virtual object ToOutput(IFieldContext context, object value) { return(value); }
protected abstract Expression GetItemExpression(IFieldContext context);
public OutputObjectScope(IFieldContext sourceFieldContext, RequestPath path, object entity) { SourceFieldContext = sourceFieldContext; Path = path; Entity = entity; }
//[Field("fields", OnType = typeof(Type__)), Null] public IList<__Field> GetFields(IFieldContext context, __Type type_, bool includeDeprecated = true) { return type_.Fields.Where(t => !t.IsHidden).ToList(); }
public __Type GetGraphQLType(IFieldContext context, string name) { var type = _schema.Types.FirstOrDefault(t => t.Name == name); return type; }
// Query resolvers public __Schema GetSchema(IFieldContext context) { return _schema; }
protected override Expression GetItemExpression(IFieldContext context) => Expression.Property(context.SerializeParams.Value, _listItem, context.Key);