示例#1
0
        private static FieldNode CreateSelection(
            FieldNode previous,
            SelectionPathComponent next)
        {
            var selectionSet = new SelectionSetNode(
                null,
                new List <ISelectionNode> {
                previous
            });

            return(CreateSelection(selectionSet, next, null));
        }
示例#2
0
        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
                   ));
        }