Replies: 1 comment 1 reply
-
|
Found a solution which seems to be working. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using spring-graphql library. To add the maxQueryComplexity and maxQueryDepth instrumentation are available, which can be configured as follows. Is there any way to create a custom instrumentation to for maxQueries.
@bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.graphql.instrumentation", name = "max-query-complexity")
public MaxQueryComplexityInstrumentation maxQueryComplexityInstrumentation(@value("${spring.graphql.instrumentation.max-query-complexity}") int maxComplexity) {
return new MaxQueryComplexityInstrumentation(maxComplexity);
}
@bean
@ConditionalOnMissingBean
@ConditionalOnProperty(prefix = "spring.graphql.instrumentation", name = "max-query-depth")
public MaxQueryDepthInstrumentation maxQueryDepthInstrumentation(@value("${spring.graphql.instrumentation.max-query-depth}") int maxDepth) {
return new MaxQueryDepthInstrumentation(maxDepth);
}
Beta Was this translation helpful? Give feedback.
All reactions