private void parseFragmentInner(Fragment fragment) throws EGraphQLException, IOException { while (hasPunctuation("@")) fragment.getDirectives().add(parseDirective()); consumePunctuation("{"); do fragment.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); }
private void parseOperationInner(Operation op) throws EGraphQLException, IOException { if (hasPunctuation("(")) { consumePunctuation("("); do op.getVariables().add(parseVariable()); while (!hasPunctuation(")")); consumePunctuation(")"); } while (hasPunctuation("@")) op.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do op.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); } }
private Field parseField() throws EGraphQLException, IOException { Field result = new Field(); result.setName(consumeName()); result.setAlias(result.getName()); if (hasPunctuation(":")) { consumePunctuation(":"); result.setName(consumeName()); } if (hasPunctuation("(")) { consumePunctuation("("); while (!hasPunctuation(")")) result.getArguments().add(parseArgument()); consumePunctuation(")"); } while (hasPunctuation("@")) result.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do { result.getSelectionSet().add(parseSelection()); } while (!hasPunctuation("}")); consumePunctuation("}"); } return result; }
private void parseFragmentInner(Fragment fragment) throws EGraphQLException, IOException { while (hasPunctuation("@")) fragment.getDirectives().add(parseDirective()); consumePunctuation("{"); do fragment.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); }
private void parseOperationInner(Operation op) throws EGraphQLException, IOException { if (hasPunctuation("(")) { consumePunctuation("("); do op.getVariables().add(parseVariable()); while (!hasPunctuation(")")); consumePunctuation(")"); } while (hasPunctuation("@")) op.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do op.getSelectionSet().add(parseSelection()); while (!hasPunctuation("}")); consumePunctuation("}"); } }
private Field parseField() throws EGraphQLException, IOException { Field result = new Field(); result.setName(consumeName()); result.setAlias(result.getName()); if (hasPunctuation(":")) { consumePunctuation(":"); result.setName(consumeName()); } if (hasPunctuation("(")) { consumePunctuation("("); while (!hasPunctuation(")")) result.getArguments().add(parseArgument()); consumePunctuation(")"); } while (hasPunctuation("@")) result.getDirectives().add(parseDirective()); if (hasPunctuation("{")) { consumePunctuation("{"); do { result.getSelectionSet().add(parseSelection()); } while (!hasPunctuation("}")); consumePunctuation("}"); } return result; }