This repository was archived by the owner on Oct 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
graphql-java-spring-boot-starter/src/main
graphql-java-spring-web/src/main/java/graphql/spring/controller Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
- package graphql ;
1
+ package graphql . spring ;
2
2
3
+ import graphql .spring .controller .GraphQLController ;
4
+ import org .springframework .beans .factory .annotation .Autowired ;
3
5
import org .springframework .boot .autoconfigure .condition .ConditionalOnWebApplication ;
6
+ import org .springframework .context .ApplicationContext ;
4
7
import org .springframework .context .annotation .ComponentScan ;
5
8
import org .springframework .context .annotation .Configuration ;
6
9
7
10
import javax .annotation .PostConstruct ;
8
11
9
12
@ Configuration
10
13
@ ConditionalOnWebApplication
11
- @ ComponentScan ("graphql" )
14
+ @ ComponentScan (basePackageClasses = GraphQLController . class )
12
15
public class GraphQLEndpointConfiguration {
13
16
17
+ @ Autowired
18
+ ApplicationContext applicationContext ;
14
19
15
20
@ PostConstruct
16
21
public void init () {
Original file line number Diff line number Diff line change 1
1
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
2
- graphql.GraphQLEndpointConfiguration
2
+ graphql.spring. GraphQLEndpointConfiguration
Original file line number Diff line number Diff line change 1
- package graphql ;
1
+ package graphql . spring . controller ;
2
2
3
3
4
+ import graphql .ExecutionInput ;
5
+ import graphql .GraphQL ;
4
6
import org .springframework .beans .factory .annotation .Autowired ;
5
7
import org .springframework .http .MediaType ;
6
8
import org .springframework .web .bind .annotation .RequestBody ;
12
14
import java .util .Map ;
13
15
14
16
@ RestController
15
- public class GraphQLResource {
17
+ public class GraphQLController {
16
18
17
19
@ Autowired
18
20
private GraphQL graphql ;
You can’t perform that action at this time.
0 commit comments