Package org.allGraphQLCases.demo
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
A sample query, to get an OAuth token:
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 "*" -iThen, 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 Summary
-
Method Summary
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
-
run
This method is started by Spring, once the Spring context has been loaded. This is run, as this class implementsCommandLineRunner
- Specified by:
run
in interfaceorg.springframework.boot.CommandLineRunner
- Throws:
Exception
-
execOne
public void execOne(PartialQueries client) throws GraphQLRequestPreparationException, GraphQLRequestExecutionException
-