|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2012-2023 the original author or authors. |
|
|
|
|
* Copyright 2012-2024 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -24,8 +24,7 @@ import java.util.List;
@@ -24,8 +24,7 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
import graphql.GraphQL; |
|
|
|
|
import graphql.execution.instrumentation.Instrumentation; |
|
|
|
|
import graphql.schema.idl.RuntimeWiring.Builder; |
|
|
|
|
import graphql.schema.visibility.NoIntrospectionGraphqlFieldVisibility; |
|
|
|
|
import graphql.introspection.Introspection; |
|
|
|
|
import org.apache.commons.logging.Log; |
|
|
|
|
import org.apache.commons.logging.LogFactory; |
|
|
|
|
|
|
|
|
|
@ -102,7 +101,7 @@ public class GraphQlAutoConfiguration {
@@ -102,7 +101,7 @@ public class GraphQlAutoConfiguration {
|
|
|
|
|
.subscriptionExceptionResolvers(subscriptionExceptionResolvers.orderedStream().toList()) |
|
|
|
|
.instrumentation(instrumentations.orderedStream().toList()); |
|
|
|
|
if (!properties.getSchema().getIntrospection().isEnabled()) { |
|
|
|
|
builder.configureRuntimeWiring(this::enableIntrospection); |
|
|
|
|
Introspection.enabledJvmWide(false); |
|
|
|
|
} |
|
|
|
|
builder.configureTypeDefinitions(new ConnectionTypeDefinitionConfigurer()); |
|
|
|
|
wiringConfigurers.orderedStream().forEach(builder::configureRuntimeWiring); |
|
|
|
|
@ -110,10 +109,6 @@ public class GraphQlAutoConfiguration {
@@ -110,10 +109,6 @@ public class GraphQlAutoConfiguration {
|
|
|
|
|
return builder.build(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Builder enableIntrospection(Builder wiring) { |
|
|
|
|
return wiring.fieldVisibility(NoIntrospectionGraphqlFieldVisibility.NO_INTROSPECTION_FIELD_VISIBILITY); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Resource[] resolveSchemaResources(ResourcePatternResolver resolver, String[] locations, |
|
|
|
|
String[] extensions) { |
|
|
|
|
List<Resource> resources = new ArrayList<>(); |
|
|
|
|
|