public InlineFragment InlineFragment(GraphQLInlineFragment source)
        {
            var frag = new InlineFragment().WithLocation(source, _body);

            frag.Type = source.TypeCondition != null?NamedType(source.TypeCondition) : null;

            frag.Directives   = Directives(source.Directives);
            frag.SelectionSet = SelectionSet(source.SelectionSet);
            return(frag);
        }
Beispiel #2
0
        public override object VisitInlineFragment(GraphQLParser.InlineFragmentContext context)
        {
            var fragment = new InlineFragment();

            fragment.Type = context.typeCondition().typeName().NAME().GetText();

            if (context.directives() != null)
            {
                fragment.Directives = Visit(context.directives()) as Directives;
            }

            if (context.selectionSet() != null)
            {
                fragment.Selections = Visit(context.selectionSet()) as Selections;
            }

            return(fragment);
        }
Beispiel #3
0
 protected bool Equals(InlineFragment other)
 {
     return(Equals(Type, other.Type));
 }