IQuery<TSource>
Namespace: GraphQL.Query.Builder
Query of TSource interface.
public interface IQuery<TSource> : IQuery
Type Parameters
TSource
Implements IQuery
Attributes NullableContextAttribute
Properties
SelectList
Gets the select list.
public abstract List<object> SelectList { get; }
Property Value
Arguments
Gets the arguments.
public abstract Dictionary<string, object> Arguments { get; }
Property Value
Methods
Alias(String)
Sets the query alias name.
IQuery<TSource> Alias(string alias)
Parameters
alias
String
The alias name.
Returns
IQuery<TSource>
The query.
AddField<TProperty>(Expression<Func<TSource, TProperty>>)
Adds a field to the query.
IQuery<TSource> AddField<TProperty>(Expression<Func<TSource, TProperty>> selector)
Type Parameters
TProperty
The property type.
Parameters
selector
Expression<Func<TSource, TProperty>>
The field selector.
Returns
IQuery<TSource>
The query.
AddField(String)
Adds a field to the query.
IQuery<TSource> AddField(string field)
Parameters
field
String
The field name.
Returns
IQuery<TSource>
The query.
AddField<TSubSource>(Expression<Func<TSource, TSubSource>>, Func<IQuery<TSubSource>, IQuery<TSubSource>>)
Adds a sub-object field to the query.
IQuery<TSource> AddField<TSubSource>(Expression<Func<TSource, TSubSource>> selector, Func<IQuery<TSubSource>, IQuery<TSubSource>> build)
Type Parameters
TSubSource
The sub-object type.
Parameters
selector
Expression<Func<TSource, TSubSource>>
The field selector.
build
Func<IQuery<TSubSource>, IQuery<TSubSource>>
The sub-object query building function.
Returns
IQuery<TSource>
The query.
AddField<TSubSource>(Expression<Func<TSource, IEnumerable<TSubSource>>>, Func<IQuery<TSubSource>, IQuery<TSubSource>>)
Adds a sub-list field to the query.
IQuery<TSource> AddField<TSubSource>(Expression<Func<TSource, IEnumerable<TSubSource>>> selector, Func<IQuery<TSubSource>, IQuery<TSubSource>> build)
Type Parameters
TSubSource
The sub-list object type.
Parameters
selector
Expression<Func<TSource, IEnumerable<TSubSource>>>
The field selector.
build
Func<IQuery<TSubSource>, IQuery<TSubSource>>
The sub-object query building function.
Returns
IQuery<TSource>
The query.
AddField<TSubSource>(String, Func<IQuery<TSubSource>, IQuery<TSubSource>>)
Adds a sub-object field to the query.
IQuery<TSource> AddField<TSubSource>(string field, Func<IQuery<TSubSource>, IQuery<TSubSource>> build)
Type Parameters
TSubSource
The sub-object type.
Parameters
field
String
The field name.
build
Func<IQuery<TSubSource>, IQuery<TSubSource>>
The sub-object query building function.
Returns
IQuery<TSource>
The query.
AddUnion<TUnionType>(String, Func<IQuery<TUnionType>, IQuery<TUnionType>>)
Adds an union to the query.
IQuery<TSource> AddUnion<TUnionType>(string typeName, Func<IQuery<TUnionType>, IQuery<TUnionType>> build)
Type Parameters
TUnionType
The union type.
Parameters
typeName
String
The union type name.
build
Func<IQuery<TUnionType>, IQuery<TUnionType>>
The union building function.
Returns
IQuery<TSource>
The query.
AddUnion<TUnionType>(Func<IQuery<TUnionType>, IQuery<TUnionType>>)
Adds an union to the query.
IQuery<TSource> AddUnion<TUnionType>(Func<IQuery<TUnionType>, IQuery<TUnionType>> build)
Type Parameters
TUnionType
The union type.
Parameters
build
Func<IQuery<TUnionType>, IQuery<TUnionType>>
The union building function.
Returns
IQuery<TSource>
The query.
AddArgument(String, Object)
Adds a new argument to the query.
IQuery<TSource> AddArgument(string key, object value)
Parameters
key
String
The argument name.
value
Object
The value.
Returns
IQuery<TSource>
The query.
AddArguments(Dictionary<String, Object>)
Adds arguments to the query.
IQuery<TSource> AddArguments(Dictionary<string, object> arguments)
Parameters
arguments
Dictionary<String, Object>
the dictionary argument.
Returns
IQuery<TSource>
The query.
AddArguments<TArguments>(TArguments)
Adds arguments to the query.
IQuery<TSource> AddArguments<TArguments>(TArguments arguments)
Type Parameters
TArguments
The arguments object type.
Parameters
arguments
TArguments
The arguments object.
Returns
IQuery<TSource>
The query.