Beispiel #1
0
        public DocumentIOFieldBuilder <TSourceType, TReturnType> Filtered <TFilterType>()
            where TFilterType : IComplexGraphType, new()
        {
            var filter = new TFilterType();

            builder.Configure(q =>
            {
                foreach (var field in filter.Fields)
                {
                    q.Arguments.Add(new QueryArgument(field.Type)
                    {
                        Description  = field.Description,
                        Name         = field.Name,
                        DefaultValue = field.DefaultValue,
                        Metadata     = field.Metadata,
                        ResolvedType = field.ResolvedType
                    });
                }
            });

            return(this);
        }