Prior to this commit, the MVC `GraphiQlHandler` variant would not
generate a redirect link with the context path prefix.
This commit takes the context path into account and adds test coverage
to both variants.
Fixes gh-231
This commit applies the `java-test-fixtures` to the project modules and
starts moving common infrastructure to the testFixtures configuration.
See gh-217
This commit adds support for validating handler method inputs after
binding from the data fetching environment and before invoking the
handler method.
This support is based on Bean Validation and is enabled only if the
application context contains a `Validator` bean.
Closes gh-110
Consolidate GraphQL argument initialization by pushing logic from
ArgumentMethodArgumentResolver down into GraphQlArgumentInitializer,
which now takes the DataFetchingEnvironment, an optional argument name,
and a target type, and does the rest of the work.
This commit changes the default value for the `spring.graphql.locations`
configuration property to `classpath:/graphql/**/`. By default, this
will scan nested locations for GraphQL schema files.
Fixes gh-210
The convert method in ArgumentMethodArgumentResolver is gone and in any
case ProjectedPayloadMethodArgumentResolver mainly needs to know the
name of the argument if an Argument annotation is present.
See gh-202
Following the addition of Query By Example, it makes sense to
consolidate the two that mirror each other, are closely related, and
can share package private support.
See gh-191
Following the changes in #191, GraphQlArgumentInitializer is no longer
package private and also needs to be used in the DataFetcher for
Query By Example. As a first step, this change moves the class to
the top-level data package that is a parent of both.
See gh-191
We now detect Querydsl customizers during auto-registration for
repositories that implement QuerydslBinderCustomizer as default
interface method.
See gh-201
This adds support for Spring Data's recent fluent query API via
Query by Example. It tests against Spring Data JPA and Spring Data MongoDB
for imperative, and Spring Data MongoDB for reactive support. To support
MongoDB testing, it uses Testcontainers.
See gh-191
This commit is a follow up of 2e4158c and makes the following changes:
* the id is now a mandatory attribute for `WebInput` and `RequestInput`
* a consistent IdGenerator strategy is configured for all requests
Closes gh-183
This commit configures all `DataLoaderRegistrar` application components
with the `GraphQlService`. This allows applications to contribute
`DataLoader` instances without using the annotated-controller
programming model.
Closes gh-189
Prior to this commit, the main GraphQL auto-configuration would be
guarded with a condition on a `GraphQlSource` bean being missing. While
we want to prevent the auto-configuration from registering such a bean
if the user configuration already did so, we should still contribute the
`GraphQlProperties` bean to the context, as it is required for other
purposes.
This commit moves the condition directly on the bean method to avoid
this.
Fixes gh-186
Prior to this commit, the `WebInput` would hold an `id` attribute that
correlate the request and response messages on a multiplexed connection.
This commit moves this concept directly to the `RequestInput` so that it
can be used as an `ExecutionId` for all types of transports, if
availble.
This id was already set on the `WebInput` in the WebFlux case with the
id coming from the exchange, but it also creates an id and set it for
the MVC case. This id is then propagated to GraphQL's `ExecutionInput`.
See gh-183