public override object VisitSelection(GraphQLParser.SelectionContext context) { if (context.field() != null) { return(Visit(context.field())); } if (context.fragmentSpread() != null) { return(Visit(context.fragmentSpread())); } if (context.inlineFragment() != null) { return(Visit(context.inlineFragment())); } return(null); }
public override object VisitSelection(GraphQLParser.SelectionContext context) { var selection = new Selection(); if (context.field() != null) { var field = Visit(context.field()) as Field; selection.Field = field; } if (context.fragmentSpread() != null) { var fragment = Visit(context.fragmentSpread()) as IFragment; selection.Fragment = fragment; } if (context.inlineFragment() != null) { var fragment = Visit(context.inlineFragment()) as IFragment; selection.Fragment = fragment; } return(selection); }