Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit db45c00

Browse files
Enable GraphQL introspection and simplify config
Register the GenericExceptionResolver as a Spring @bean and remove the custom GraphQlSourceBuilderCustomizer and GraphQLExecutionInstrumentation usage. Also enable schema introspection via application.properties (spring.graphql.schema.introspection.enabled=true). These changes simplify GraphQL configuration and ensure schema introspection is turned on through properties rather than a programmatic customizer.
1 parent a7ffc8f commit db45c00

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
11
package com.espacogeek.geek.config;
22

3+
import org.springframework.context.annotation.Bean;
34
import org.springframework.context.annotation.Configuration;
45
import org.springframework.graphql.execution.DataFetcherExceptionResolver;
56

67
import com.espacogeek.geek.exception.resolver.GenericExceptionResolver;
7-
import com.espacogeek.geek.metrics.GraphQLExecutionInstrumentation;
8-
import org.springframework.graphql.execution.GraphQlSourceBuilderCustomizer;
98

109
@Configuration
1110
public class GraphQLConfig {
1211

12+
@Bean
1313
public DataFetcherExceptionResolver customGraphQLExceptionResolver() {
1414
return new GenericExceptionResolver();
1515
}
16-
17-
public GraphQlSourceBuilderCustomizer sourceBuilderCustomizer(GraphQLExecutionInstrumentation instrumentation) {
18-
return builder -> builder.configureGraphQlSource(source ->
19-
source.introspectionEnabled(true)
20-
);
21-
}
2216
}

src/main/resources/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ spring.graphql.path=/
1313

1414
spring.graphql.graphiql.enabled=true
1515
spring.graphql.graphiql.path=/graphiql
16+
spring.graphql.schema.introspection.enabled=true
1617

1718
spring.flyway.enabled=true
1819
spring.flyway.locations=classpath:db/migration

0 commit comments

Comments
 (0)