Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 4640762

Browse files
committed
Merge branch 'graphql-java-kickstart-master'
2 parents 87eb576 + 92bc9aa commit 4640762

File tree

8 files changed

+70
-12
lines changed

8 files changed

+70
-12
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

graphql-kickstart-spring-boot-autoconfigure-tools/src/main/java/graphql/kickstart/tools/boot/GraphQLJavaToolsAutoConfiguration.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import graphql.kickstart.tools.PerFieldObjectMapperProvider;
1111
import graphql.kickstart.tools.SchemaParser;
1212
import graphql.kickstart.tools.SchemaParserBuilder;
13+
import graphql.kickstart.tools.SchemaParserDictionary;
1314
import graphql.kickstart.tools.SchemaParserOptions;
1415
import graphql.kickstart.tools.SchemaParserOptions.GenericWrapper;
1516
import graphql.kickstart.tools.TypeDefinitionFactory;
@@ -34,6 +35,8 @@
3435
import org.springframework.context.annotation.Bean;
3536
import org.springframework.context.annotation.Configuration;
3637

38+
import static java.util.Objects.nonNull;
39+
3740
/**
3841
* @author Andrew Potter
3942
*/
@@ -45,7 +48,7 @@
4548
public class GraphQLJavaToolsAutoConfiguration {
4649

4750
@Autowired(required = false)
48-
private SchemaParserBuilder schemaParserBuilder;
51+
private SchemaParserDictionary dictionary;
4952

5053
@Autowired(required = false)
5154
private GraphQLScalarType[] scalars;
@@ -87,7 +90,7 @@ public SchemaStringProvider schemaStringProvider() {
8790
@ConditionalOnMissingBean
8891
@ConfigurationProperties("graphql.tools.schema-parser-options")
8992
public SchemaParserOptions.Builder optionsBuilder(
90-
PerFieldObjectMapperProvider perFieldObjectMapperProvider
93+
@Autowired(required = false) PerFieldObjectMapperProvider perFieldObjectMapperProvider
9194
) {
9295
SchemaParserOptions.Builder optionsBuilder = SchemaParserOptions.newOptions();
9396

@@ -122,8 +125,10 @@ public SchemaParser schemaParser(
122125
SchemaStringProvider schemaStringProvider,
123126
SchemaParserOptions.Builder optionsBuilder
124127
) throws IOException {
125-
SchemaParserBuilder builder = schemaParserBuilder != null ? schemaParserBuilder : new SchemaParserBuilder();
126-
128+
SchemaParserBuilder builder = new SchemaParserBuilder();
129+
if (nonNull(dictionary)) {
130+
builder.dictionary(dictionary.getDictionary());
131+
}
127132
List<String> schemaStrings = schemaStringProvider.schemaStrings();
128133
schemaStrings.forEach(builder::schemaString);
129134

graphql-kickstart-spring-boot-autoconfigure-webflux/src/main/java/graphql/kickstart/spring/webflux/boot/GraphQLSpringWebfluxAutoConfiguration.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.springframework.beans.factory.annotation.Autowired;
3838
import org.springframework.beans.factory.annotation.Value;
3939
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
40+
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
4041
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
4142
import org.springframework.context.annotation.Bean;
4243
import org.springframework.context.annotation.ComponentScan;
@@ -48,6 +49,7 @@
4849

4950
@Slf4j
5051
@Configuration
52+
@ConditionalOnBean({GraphQLSchema.class})
5153
@AutoConfigureAfter({GraphQLJavaToolsAutoConfiguration.class})
5254
@ComponentScan(basePackageClasses = GraphQLController.class)
5355
public class GraphQLSpringWebfluxAutoConfiguration {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies {
22
api(project(':graphql-kickstart-spring-support'))
33

4-
compileOnly "com.graphql-java-kickstart:graphql-java-kickstart:$LIB_GRAPHQL_SERVLET_VER"
5-
compileOnly "org.springframework.boot:spring-boot-starter-webflux"
4+
api "com.graphql-java-kickstart:graphql-java-kickstart:$LIB_GRAPHQL_SERVLET_VER"
5+
api "org.springframework.boot:spring-boot-starter-webflux"
66
}

graphql-spring-boot-autoconfigure/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ dependencies {
2525
api "com.graphql-java-kickstart:graphql-java-servlet:$LIB_GRAPHQL_SERVLET_VER"
2626
api "com.graphql-java:graphql-java:$LIB_GRAPHQL_JAVA_VER"
2727

28-
implementation "org.springframework.boot:spring-boot-starter-websocket"
29-
implementation "org.springframework.boot:spring-boot-starter-web"
30-
implementation "org.springframework.boot:spring-boot-starter-actuator"
28+
api "org.springframework.boot:spring-boot-starter-websocket"
29+
api "org.springframework.boot:spring-boot-starter-web"
30+
api "org.springframework.boot:spring-boot-starter-actuator"
3131

3232
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
3333
compileOnly "org.springframework.boot:spring-boot-configuration-processor"

graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/spring/web/boot/GraphQLWebAutoConfiguration.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,7 @@ public GraphQLInvocationInputFactory invocationInputFactory(GraphQLSchemaServlet
230230

231231
@Bean
232232
@ConditionalOnMissingBean
233-
public GraphQLQueryInvoker queryInvoker(
234-
ExecutionStrategyProvider executionStrategyProvider
235-
) {
233+
public GraphQLQueryInvoker queryInvoker(ExecutionStrategyProvider executionStrategyProvider) {
236234
GraphQLQueryInvoker.Builder builder = GraphQLQueryInvoker.newBuilder()
237235
.withExecutionStrategyProvider(executionStrategyProvider);
238236

graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/spring/web/boot/GraphQLWsServerEndpointRegistration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package graphql.kickstart.spring.web.boot;
22

33
import graphql.kickstart.servlet.GraphQLWebsocketServlet;
4+
import org.apache.tomcat.websocket.PerMessageDeflate;
45
import org.springframework.context.Lifecycle;
56
import org.springframework.web.socket.server.standard.ServerEndpointRegistration;
67

0 commit comments

Comments
 (0)