CombinedWiringFactory makes use of multiple WiringFactory instances
possible, but RuntimeWiring.Builder does not use it by default.
This change enables use of multiple WiringFactory instances through
an extra callback on RuntimeWiringConfigurer that allows multiple
parties to add their own WiringFactory.
See gh-244
Prior to this commit, we would use the request id as an execution id,
regardless of the overall GraphQL configuration.
This commit:
* adds a new executionId field on `RequestInput` and uses it in the
`ExecutionInput`, if provided
* only uses the request id as a fallback if it's been asked to
* auto-detect in the `GraphQlService` whether a custom
`ExecutionIdProvider` implementation was configured on `GraphQL`.
Closes gh-243
This commit enhances the GraphiQL `index.html` to rely in the
graphiql-tools fetcher function; this supports both HTTP and WebSocket
transports.
As a follow-up, this also updates the `GraphiQlHandler` implementations
to also send a `wsPath` query param if a specific path has been
configured for the WebSocket support.
As an additional change, this commit also improves the fix for gh-231 as
it was incomplete: the generated query params were not taking the
context path into account.
Closes gh-131
Closes gh-231
WebOutput now exposes the ExecutionInput prepared for the request and
no longer provides access to the WebInput which is already available
to a WebInterceptor.
Closes gh-229
Previously when the argument contained a null value (for example for nullified
continuation when using a suspend fun), it would fail to convert the arguments,
because of a `NullPointerException`.
By allowing the mono value be nullable it converts the arguments successfully.
Closes gh-239
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.
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
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
This commit upgrades the experimental starter to Spring Boot 2.6.0-RC1
and aligns all dependency versions to the Spring Boot dependency
management in 2.6.
This commit also removes temporary workarounds in the testing support or
in declared dependencies now that we've moved to 2.6.
While we're now using Spring Boot 2.6 as a reference version for this
project, the baseline didn't change and this commit documents the
requirements for this project; the Spring Data version, for our QueryDSL
support, is a specific example of that.
Fixes gh-181
Add GraphQlSetup that provides a unified workflow for test setup
including the creation of a GraphQsSource, a GraphQlService, a
WebGraphQlHandler, and/or HTTP handlers. The workflow also helps to
collect input (schema, data fetchers) in ways that are convenient
for testing purposes.