Exemplo n.º 1
0
        public override object VisitDirectives(GraphQLParser.DirectivesContext context)
        {
            var directives = new Directives();

            foreach (var dir in context.directive())
            {
                directives.Add((Directive)Visit(dir));
            }

            return(directives);
        }
Exemplo n.º 2
0
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            directives?.Apply(d =>
            {
                var dir       = new Directive(Name(d.Name)).WithLocation(d, _body);
                dir.Arguments = Arguments(d.Arguments);
                target.Add(dir);
            });
            return(target);
        }
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            if (directives != null)
            {
                foreach (var d in directives)
                {
                    target.Add(Directive(d));
                }
            }

            return(target);
        }
        public Directives Directives(IEnumerable <GraphQLDirective> directives)
        {
            var target = new Directives();

            if (directives != null)
            {
                foreach (var d in directives)
                {
                    var dir = new Directive(Name(d.Name)).WithLocation(d, _body);
                    dir.Arguments = Arguments(d.Arguments);
                    target.Add(dir);
                }
            }

            return(target);
        }
Exemplo n.º 5
0
 protected bool Equals(Directives directives)
 {
     return(false);
 }
Exemplo n.º 6
0
 public FragmentDefinition()
 {
     Directives = new Directives();
 }
Exemplo n.º 7
0
 public Operation()
 {
     OperationType = OperationType.Query;
     Directives    = new Directives();
     Variables     = new VariableDefinitions();
 }
Exemplo n.º 8
0
 public FragmentSpread()
 {
     Directives = new Directives();
 }