Class PartialPreparedQueriesDeprecatedWay

java.lang.Object
org.allGraphQLCases.demo.impl.PartialPreparedQueriesDeprecatedWay
All Implemented Interfaces:
PartialQueries

@Component public class PartialPreparedQueriesDeprecatedWay extends Object implements PartialQueries
This class implements the deprecated way to call GraphQl partialQueries, where all partialQueries are prepared before execution. It's the deprecated way, as it is based on the ObjectResponse and the withQueryResponseDef Builder method. This test is here to insure compatibility of this way of coding, with future evolution of the plugin.
The advantages of preparing a request are:
  • Performance: this avoid to build an ObjectResponse for each response. This ObjectResponse is useful, to help control at runtime if a field has been queried or not. It allows to throw an exception when your code tries to use a field that was not queried
  • Security: as all request have been prepared at startup, this make sure at startup that your partialQueries are valid.
Author:
etienne-sf
  • Constructor Details

    • PartialPreparedQueriesDeprecatedWay

      public PartialPreparedQueriesDeprecatedWay()
  • Method Details

    • init

      @PostConstruct public void init() throws com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Preparation of the GraphQL requests (queries, mutations)
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • withoutParameters

      public List<CIP_Character_CIS> withoutParameters() throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      withoutParameters in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • withOneOptionalParam

      public CIP_Character_CIS withOneOptionalParam(CINP_CharacterInput_CINS character) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      withOneOptionalParam in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • withOneMandatoryParam

      public CIP_Character_CIS withOneMandatoryParam(CINP_CharacterInput_CINS character) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      withOneMandatoryParam in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • withEnum

      public CIP_Character_CIS withEnum(CEP_Episode_CES episode) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      withEnum in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • withList

      public List<CIP_Character_CIS> withList(String name, List<CINP_CharacterInput_CINS> friends) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      withList in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • error

      public CIP_Character_CIS error(String errorLabel) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      error in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • allFieldCases

      public CTP_AllFieldCases_CTS allFieldCases(CINP_AllFieldCasesInput_CINS allFieldCasesInput, Boolean uppercase, String textToAppendToTheForname, long nbItemsWithId, Date date, OffsetDateTime dateTime, List<Date> dates, Boolean uppercaseNameList, String textToAppendToTheFornameWithId, CINP_FieldParameterInput_CINS input, int nbItemsWithoutId, CINP_FieldParameterInput_CINS inputList, String textToAppendToTheFornameWithoutId) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      allFieldCases in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • aBreak

      public CTP_break_CTS aBreak(CEP_extends_CES test, String $if) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      aBreak in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
    • createHuman

      public CTP_Human_CTS createHuman(CINP_HumanInput_CINS human) throws com.graphql_java_generator.exception.GraphQLRequestExecutionException, com.graphql_java_generator.exception.GraphQLRequestPreparationException
      Specified by:
      createHuman in interface PartialQueries
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestExecutionException
      com.graphql_java_generator.exception.GraphQLRequestPreparationException