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