public override IGraphQLBaseNode ProcessQuery(GraphQLQueryNode field, IncludeArguments arguments) { if (arguments.@if) { return(field); } return(null); }
public IGraphQLBaseNode ProcessQueryInternal(GraphQLQueryNode field, object arguments) { var result = ProcessQuery(field, (TArguments)arguments); if (ProcessesResult) { // wrap expression in a call to process the result // field.Wrap(exp => Expression.Call(Expression.Constant(this), "ProcessResult", null, exp, arguments)); } return(result); }
/// <summary> /// Implement this to make changes to the item marked with the directive. /// GraphQLQueryNode details the expressions for the field query /// </summary> /// <param name="field"></param> /// <param name="arguments">Any arguments passed to the directive</param> /// <returns>Return a modified (from field) or new IGraphQLBaseNode. Returning null will remove the item from the resulting query</returns> public virtual IGraphQLBaseNode ProcessQuery(GraphQLQueryNode field, TArguments arguments) { // by default we do nothing return(field); }