private static FieldNode CreateSelection( FieldNode previous, SelectionPathComponent next) { var selectionSet = new SelectionSetNode( null, new List <ISelectionNode> { previous }); return(CreateSelection(selectionSet, next, null)); }
private static FieldNode CreateSelection( SelectionSetNode selectionSet, SelectionPathComponent next, string alias) { NameNode aliasNode = string.IsNullOrEmpty(alias) ? null : new NameNode(alias); return(new FieldNode ( null, next.Name, aliasNode, Array.Empty <DirectiveNode>(), RewriteVariableNames(next.Arguments).ToList(), selectionSet )); }