public override INode VisitOperationDefinition(OperationDefinition node) { VisitList(node.VariableDefinitions); VisitList(node.Directives); Visit(node.SelectionSet); return(DefaultVisit(node)); }
public override string VisitOperationDefinition(OperationDefinition node) { var op = node.Operation == OperationType.Query ? "query" : "mutation"; var name = Visit(node.Name); var defs = Wrap("(", JoinNotNull(", ", VisitList(node.VariableDefinitions)), ")"); var directives = JoinNotNull(" ", VisitList(node.Directives)); var selectionSet = Visit(node.SelectionSet); var nameDefsJoin = JoinNotNull("", name, defs); var res = IsNullOrEmpty(name) ? selectionSet : JoinNotNull(" ", op, nameDefsJoin, directives, selectionSet); return(res); }
public override INode VisitOperationDefinition(OperationDefinition node) { var updatedNode = EnterOperationDefinition(node); if (updatedNode == null) { return(null); } var name = Visit(updatedNode.Name); var variableDefinitions = VisitList(updatedNode.VariableDefinitions); var directives = VisitList(updatedNode.Directives); var selectionSet = Visit(updatedNode.SelectionSet); updatedNode = updatedNode.Update(node.Operation, name, variableDefinitions, directives, selectionSet); updatedNode = LeaveOperationDefinition(updatedNode); return(updatedNode); }
public virtual OperationDefinition LeaveOperationDefinition(OperationDefinition operationDefinition) { return(Leave(operationDefinition)); }
public virtual OperationDefinition EnterOperationDefinition(OperationDefinition operationDefinition) { return(Enter(operationDefinition)); }
public virtual TResult VisitOperationDefinition(OperationDefinition node) { return(DefaultVisit(node)); }