private object Visit(GraphQLParser.AST.ASTNode node) { switch (node) { case GraphQLOperationDefinition op: return(new Operation(op)); case GraphQLInterfaceTypeDefinition op: return(new InterfaceType(op)); case GraphQLObjectTypeDefinition op: return(new ObjectType(op)); case GraphQLEnumTypeDefinition op: return(new EnumType(op)); case GraphQLUnionTypeDefinition op: return(new UnionType(op)); case GraphQLInputObjectTypeDefinition op: return(new ObjectType(op)); default: return(null); } }
private object VisitSelectionSet(GraphQLParser.AST.ASTNode node) { switch (node) { case GraphQLFieldSelection op: return(new FieldSelection(op)); default: return(node); } }
private object Visit(GraphQLParser.AST.ASTNode node) { switch (node) { case GraphQLFieldSelection op: return(new FieldSelection(op)); case GraphQLInlineFragment op: return(new SetSelection(op)); case GraphQLFragmentSpread op: return(op.Name); default: return(node); } }