Class Main

java.lang.Object
org.allGraphQLCases.demo.Main
All Implemented Interfaces:
org.springframework.boot.CommandLineRunner

@SpringBootApplication(scanBasePackageClasses={Main.class,com.graphql_java_generator.client.GraphqlClientUtils.class,MyQueryTypeExecutorAllGraphQLCases.class,MyQueryTypeExecutorAllGraphQLCases2.class,QueryExecutorForum.class}) @EnableAutoConfiguration(exclude={org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration.class,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration.class,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration.class}) public class Main extends Object implements org.springframework.boot.CommandLineRunner
The main class, which executes the same partialQueries, built by three different methods. See PartialDirectQueries, PartialPreparedQueries, PartialWithBuilder
A sample query, to get an OAuth token:
curl -u "clientId:secret" -X POST "http://localhost:8181/oauth2/token?grant_type=client_credentials" --noproxy "*" -i
 
Then, reuse the previous token in the next query:
curl -i -X POST "http://localhost:8180/graphql" --noproxy "*" -H "Authorization: Bearer 8c8e4a5b-d903-4ed6-9738-6f7f364b87ec"
 
Author:
etienne-sf
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String[] args)
    • run

      public void run(String... args) throws Exception
      This method is started by Spring, once the Spring context has been loaded. This is run, as this class implements CommandLineRunner
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Throws:
      Exception
    • execOne

      public void execOne(PartialQueries client) throws com.graphql_java_generator.exception.GraphQLRequestPreparationException, com.graphql_java_generator.exception.GraphQLRequestExecutionException
      Throws:
      com.graphql_java_generator.exception.GraphQLRequestPreparationException
      com.graphql_java_generator.exception.GraphQLRequestExecutionException