Reduce the number of times capacity growth is needed inside the StringWriter.
A typical default SpringBoot Prometheus page has more than 11k characters.
Best performance results when no capacity growth is needed at all, so base
it on previous metrics page size plus some room for possible extra metric info.
See gh-30085
Reduce the number of times capacity growth is needed inside the StringWriter.
A typical default SpringBoot Prometheus page has more than 11k characters.
Best performance results when no capacity growth is needed at all, so base
it on previous metrics page size plus some room for possible extra metric info.
See gh-30085
Prior to this commit, `@GraphQlTest` slice tests would only consider
JsonComponent, RuntimeWiringConfigurer, Converter and
GenericConverter beans. But DataFetcherExceptionResolver,
Instrumentation and GraphQlSourceBuilderCustomizer are used in
setting up the GraphQL source.
This commit ensures that the `GraphQlTypeExcludeFilter` considers
those bean types.
Closes gh-30078
Prior to this commit, launching a GraphQL application without any schema
file or customizer bean would result in an exception caught by a
FailureAnalyzer telling the developer about configured locations.
Since then, a new client has been introduced in Spring GraphQL and the
mere presence of the GraphQL starter does not mean anymore that the
intent is to create a GraphQL API in the app: we could instead just
consume an existing, remote API.
This commit refines the GraphQL server auto-configuration so that it is
enabled only if:
* there is at least one schema file in the configured locations
* or a `GraphQlSourceCustomizer` bean has been defined in the app
These changes make the custom FailureAnalyzer useless and is also
removed as part of this commit.
Closes gh-30035
Prior to this commit, we would configure a default conversion service
for GraphQL annotated controllers, without registering any additional
formatters.
This commit aligns the GraphQL auto-configuration with MVC and WebFlux,
since we now use the `ApplicationConversionService` to register all
application formatters for the GraphQL infrastructure.
Closes gh-29638
After 0b449d89e1,
the ConversionService on AnnotatedControllerConfigurer is an internally
managed instance that is customized with FormatterRegistrar rather than
set.
Closes gh-29636
This commit switches to 1.0.0-SNAPSHOT for Spring GraphQL, before its
upcoming 1.0.0-M6 version.
This commit adapts to the changes introduced in
spring-projects/spring-graphql#317 : now that `GraphQlClient` has been
introduced, `GraphQlTester` has been aligned with the new
infrastructure. The `@GraphQlTest` and `@SpringBootTest` testing support
is now using different variants for each.
All samples have been updated to use the proper GraphQL terminology, see
and spring-projects/spring-graphql#310 .
See gh-29637
Due to gh-29695, smoketest.profile.ActiveProfilesTests starts a web
server bound to the default port (8080) despite the test setting
`webEnvironment` to `NONE`.
This commit works around the problem by running the tests with
server.port set to zero.
Closes gh-30086