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

Commit 04b0171

Browse files
author
Bruno Rodrigues
committed
Merge branch 'master' into metrics-instrumentation
2 parents 88e7423 + 2d8fb25 commit 04b0171

File tree

25 files changed

+16616
-76
lines changed

25 files changed

+16616
-76
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ repositories {
4242
}
4343
4444
dependencies {
45-
compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.0.4'
45+
compile 'com.graphql-java-kickstart:graphql-spring-boot-starter:5.0.5'
4646
4747
// to embed GraphiQL tool
48-
compile 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.0.4'
48+
compile 'com.graphql-java-kickstart:graphiql-spring-boot-starter:5.0.5'
4949
5050
// to embed Voyager tool
51-
compile 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.0.4'
51+
compile 'com.graphql-java-kickstart:voyager-spring-boot-starter:5.0.5'
5252
}
5353
```
5454

@@ -57,21 +57,21 @@ Maven:
5757
<dependency>
5858
<groupId>com.graphql-java-kickstart</groupId>
5959
<artifactId>graphql-spring-boot-starter</artifactId>
60-
<version>5.0.4</version>
60+
<version>5.0.5</version>
6161
</dependency>
6262

6363
<!-- to embed GraphiQL tool -->
6464
<dependency>
6565
<groupId>com.graphql-java-kickstart</groupId>
6666
<artifactId>graphiql-spring-boot-starter</artifactId>
67-
<version>5.0.4</version>
67+
<version>5.0.5</version>
6868
</dependency>
6969

7070
<!-- to embed Voyager tool -->
7171
<dependency>
7272
<groupId>com.graphql-java-kickstart</groupId>
7373
<artifactId>voyager-spring-boot-starter</artifactId>
74-
<version>5.0.4</version>
74+
<version>5.0.5</version>
7575
</dependency>
7676
```
7777

@@ -167,6 +167,9 @@ Available Spring Boot configuration parameters (either `application.yml` or `app
167167
graphql:
168168
tools:
169169
schemaLocationPattern: "**/*.graphqls"
170+
# Enable or disable the introspection query. Disabling it puts your server in contravention of the GraphQL
171+
# specification and expectations of most clients, so use this option with caution
172+
introspectionEnabled: true
170173
```
171174
By default GraphQL tools uses the location pattern `**/*.graphqls` to scan for GraphQL schemas on the classpath.
172175
Use the `schemaLocationPattern` property to customize this pattern.

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
buildscript {
2121
repositories {
2222
mavenLocal()
23-
maven { url "http://dl.bintray.com/graphql-java-kickstart/releases" }
23+
mavenCentral()
24+
jcenter()
25+
maven { url "https://dl.bintray.com/graphql-java-kickstart/releases" }
2426
maven { url "https://plugins.gradle.org/m2/" }
2527
maven { url 'http://repo.spring.io/plugins-release' }
2628
}
@@ -45,8 +47,9 @@ subprojects {
4547

4648
repositories {
4749
mavenLocal()
50+
mavenCentral()
4851
jcenter()
49-
maven { url "http://dl.bintray.com/graphql-java-kickstart/releases" }
52+
maven { url "http://oss.jfrog.org/artifactory/oss-snapshot-local" }
5053
maven { url "http://repo.spring.io/libs-milestone" }
5154
}
5255

example-graphql-tools/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ repositories {
2929
dependencies {
3030
compile(project(":graphql-spring-boot-starter"))
3131
compile(project(":graphiql-spring-boot-starter"))
32+
compile(project(":voyager-spring-boot-starter"))
3233
compile "com.graphql-java-kickstart:graphql-java-tools:$LIB_GRAPHQL_JAVA_TOOLS_VER"
3334

3435
compile("org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER")

example-graphql-tools/src/test/java/com/oembedler/moon/graphql/boot/GraphQLToolsSampleApplicationTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public void get_comments() throws IOException {
2828
GraphQLResponse response = graphQLTestTemplate.postForResource("graphql/post-get-comments.graphql");
2929
assertNotNull(response);
3030
assertTrue(response.isOk());
31-
System.out.println(response.getRawResponse().getBody());
3231
assertEquals("1", response.get("$.data.post.id"));
3332
}
3433

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.oembedler.moon.graphql.boot;
2+
3+
import org.junit.Ignore;
4+
import org.junit.Test;
5+
import org.junit.runner.RunWith;
6+
import org.springframework.boot.test.context.SpringBootTest;
7+
import org.springframework.test.context.junit4.SpringRunner;
8+
9+
@RunWith(SpringRunner.class)
10+
@SpringBootTest
11+
public class SpringBootTestWithoutWebEnvironmentTest {
12+
13+
@Test
14+
@Ignore
15+
public void loads_without_complaining_about_missing_ServerContainer() {
16+
17+
}
18+
19+
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
#
1919

20-
version = 5.0.5-SNAPSHOT
20+
version = 5.0.7-SNAPSHOT
2121
PROJECT_GROUP = com.graphql-java-kickstart
2222
PROJECT_NAME = graphql-spring-boot
2323
PROJECT_DESC = GraphQL Spring Framework Boot
@@ -40,8 +40,8 @@ LIB_GRAPHQL_JAVA_VER = 9.2
4040
LIB_JUNIT_VER = 4.12
4141
LIB_SPRING_CORE_VER = 5.0.4.RELEASE
4242
LIB_SPRING_BOOT_VER = 2.0.5.RELEASE
43-
LIB_GRAPHQL_SERVLET_VER = 6.1.4
44-
LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.3
43+
LIB_GRAPHQL_SERVLET_VER = 6.2.0
44+
LIB_GRAPHQL_JAVA_TOOLS_VER = 5.3.5
4545
LIB_COMMONS_IO_VER = 2.6
4646

4747
GRADLE_WRAPPER_VER = 4.7

graphiql-spring-boot-autoconfigure/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1818
*/
1919
dependencies{
20-
compile "org.springframework.boot:spring-boot-configuration-processor:$LIB_SPRING_BOOT_VER"
20+
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor:$LIB_SPRING_BOOT_VER"
21+
2122
compile "org.springframework.boot:spring-boot-autoconfigure:$LIB_SPRING_BOOT_VER"
2223
compile "org.apache.commons:commons-text:1.1"
2324
compileOnly "org.springframework.boot:spring-boot-starter-web:$LIB_SPRING_BOOT_VER"

graphiql-spring-boot-autoconfigure/src/main/java/com/oembedler/moon/graphiql/boot/GraphiQLController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ private Map<String, String> getReplacements(String graphqlEndpoint, String subsc
109109
replacements.put("subscriptionsEndpoint", subscriptionsEndpoint);
110110
replacements.put("staticBasePath", staticBasePath);
111111
replacements.put("pageTitle", pageTitle);
112-
replacements.put("graphiqlCssUrl", graphiqlUrl("graphiql.min.css"));
113-
replacements.put("graphiqlJsUrl", graphiqlUrl("graphiql.min.js"));
112+
replacements.put("graphiqlCssUrl", graphiqlUrl(staticBasePath, "graphiql.min.css"));
113+
replacements.put("graphiqlJsUrl", graphiqlUrl(staticBasePath, "graphiql.min.js"));
114114
replacements.put("props", props);
115115
replacements.put("headers", headers);
116116
return replacements;
117117
}
118118

119-
private String graphiqlUrl(String filename) {
119+
private String graphiqlUrl(String staticBasePath, String filename) {
120120
if (graphiqlCdnEnabled && StringUtils.isNotBlank(graphiqlCdnVersion)) {
121121
return CDNJS_CLOUDFLARE_COM_AJAX_LIBS_GRAPHIQL + graphiqlCdnVersion + "/" + filename;
122122
}

graphiql-spring-boot-autoconfigure/src/main/resources/graphiql.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
<link rel="stylesheet" href="${graphiqlCssUrl}"/>
3333
<script src="${graphiqlJsUrl}"></script>
34-
<script src="//unpkg.com/subscriptions-transport-ws@0.8.3/browser/client.js"></script>
35-
<script src="//unpkg.com/graphiql-subscriptions-fetcher@0.0.2/browser/client.js"></script>
34+
<script src="${staticBasePath}vendor/subscriptions-transport-ws-browser-client-0.8.3.js"></script>
35+
<script src="${staticBasePath}vendor/graphiql-subscriptions-fetcher-browser-client-0.0.2.js"></script>
3636
</head>
3737
<body>
3838
<div id="splash">

0 commit comments

Comments
 (0)