Skip to content

Commit 742c99f

Browse files
refactor: update grpc registry, plugins
1 parent 0830119 commit 742c99f

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
2-
id("org.hypertrace.repository-plugin") version "0.4.0"
2+
id("org.hypertrace.repository-plugin") version "0.4.1"
33
id("org.hypertrace.ci-utils-plugin") version "0.3.0"
44
id("org.hypertrace.jacoco-report-plugin") version "0.2.0" apply false
5-
id("org.hypertrace.docker-java-application-plugin") version "0.9.0" apply false
6-
id("org.hypertrace.docker-publish-plugin") version "0.9.0" apply false
7-
id("org.hypertrace.code-style-plugin") version "1.1.0" apply false
5+
id("org.hypertrace.docker-java-application-plugin") version "0.9.5" apply false
6+
id("org.hypertrace.docker-publish-plugin") version "0.9.5" apply false
7+
id("org.hypertrace.code-style-plugin") version "1.1.2" apply false
88
}
99

1010
subprojects {

hypertrace-graphql-impl/src/main/java/org/hypertrace/graphql/impl/GraphQlModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ protected void configure() {
5454
bind(GraphQlServiceConfig.class).toInstance(this.config);
5555
bind(HypertraceGraphQlServiceConfig.class).toInstance(this.config);
5656
bind(GraphQlServiceLifecycle.class).toInstance(this.serviceLifecycle);
57+
bind(GrpcChannelRegistry.class).toInstance(this.grpcChannelRegistry);
5758
bind(Clock.class).toInstance(Clock.systemUTC());
5859
install(new GraphQlRequestContextModule());
59-
install(new GraphQlGrpcModule(this.grpcChannelRegistry));
60+
install(new GraphQlGrpcModule());
6061
install(new GraphQlSchemaRegistryModule());
6162
install(new GraphQlDeserializationRegistryModule());
6263
install(new HypertraceAttributeScopeModule());

hypertrace-graphql-impl/src/test/java/org/hypertrace/graphql/impl/GraphQlModuleTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import static org.mockito.Mockito.mock;
55

66
import com.google.inject.Guice;
7+
import graphql.schema.GraphQLSchema;
78
import org.hypertrace.core.graphql.spi.lifecycle.GraphQlServiceLifecycle;
89
import org.hypertrace.core.grpcutils.client.GrpcChannelRegistry;
910
import org.hypertrace.graphql.config.HypertraceGraphQlServiceConfig;
@@ -22,4 +23,16 @@ public void testResolveBindings() {
2223
mock(GrpcChannelRegistry.class)))
2324
.getAllBindings());
2425
}
26+
27+
@Test
28+
public void testResolveSchema() {
29+
assertDoesNotThrow(
30+
() ->
31+
Guice.createInjector(
32+
new GraphQlModule(
33+
mock(HypertraceGraphQlServiceConfig.class),
34+
mock(GraphQlServiceLifecycle.class),
35+
mock(GrpcChannelRegistry.class)))
36+
.getInstance(GraphQLSchema.class));
37+
}
2538
}

0 commit comments

Comments
 (0)