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); }
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); }
protected bool Equals(InlineFragment other) { return(Equals(Type, other.Type)); }