Commit Graph

50 Commits

Author SHA1 Message Date
Brian Clozel
26c5cf0265 Align dependency management with Spring Boot 2.7.0 2022-05-17 16:06:58 +02:00
Brian Clozel
bd9d417c8a Fix Kotlin compiler configuration
The `-Xopt-in` option is now deprecated and replaced by `-opt-in`.
2022-05-16 11:31:04 +02:00
rstoyanchev
57e9ccbfd8 Upgrade to GraphQL Java 18.1 2022-05-13 03:02:30 +01:00
Brian Clozel
c5d6de8266 Disable publication of test-fixtures JARs 2022-04-19 18:16:45 +02:00
Brian Clozel
b8b1404027 Upgrade to Spring Boot 2.7.0-RC1 dependencies
This commit aligns with the Spring Boot dependency management for the
upcoming 2.7.0-RC1 release.
2022-04-19 17:59:47 +02:00
Brian Clozel
e455ebb3d8 Support application/graphql+json content type
The GraphQL HTTP spec now requires the `"application/graphql+json"`
content type.
This commit applies this type by default in the server and client
implementations. `"application/json"` is still accepted and produced if
requested by clients.

Closes gh-108
2022-04-04 13:34:18 +02:00
rstoyanchev
1462050005 Add RSocketGraphQlClient and GraphQlRSocketHandler
See gh-339
2022-03-28 09:05:40 +01:00
Brian Clozel
f650c56d67 Compile against latest milestones
This commit ensures that we compile against the latest milestones
released. This is mandatory before releasing our own milestone.
2022-03-22 15:55:09 +01:00
rstoyanchev
4d115c01cc Upgrade dependencies
GraphQL Java 18.0
Reactor 2020.0.17
Spring Framework, Spring Data, Spring Security snapshots
2022-03-16 10:00:37 +00:00
Brian Clozel
76940c279e Configure Javadoc links to external sources 2022-01-19 15:48:06 +01:00
Brian Clozel
641b0f0506 Align Kotlin dependency on Spring Framework 5.3.x
Prior to this commit, spring-graphql would depend on Kotlin 1.6, which
is not in line with Spring Framework 5.3.x requirements. This commit
realigns our dependency management on Kotlin 1.5.x.

Also, this commit configures the build to not publish a kotlin-stdlib
runtime dependency in our POM.

Closes gh-265
2022-01-19 14:54:36 +01:00
rstoyanchev
7a7e2e87dc Update project name to Spring for GraphQL
Closes gh-255
2022-01-13 12:16:02 +00:00
Brian Clozel
a15fd29fc0 Remove Spring Boot Experimental Starter
The Experimental Spring Boot Starter for Spring GraphQL has been moved
to Spring Boot and will be released with Spring Boot 2.7.0.

Closes gh-207
2021-12-21 14:09:17 +01:00
Brian Clozel
2ded7469f4 Upgrade to Log4J 2.16.0
Closes gh-222
2021-12-14 22:22:31 +01:00
Brian Clozel
dd81d72fcb Start moving testing infra as test fixtures
This commit applies the `java-test-fixtures` to the project modules and
starts moving common infrastructure to the testFixtures configuration.

See gh-217
2021-12-10 22:52:14 +01:00
Brian Clozel
3e29e71a6e Add support for Bean Validation
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
2021-12-10 15:50:16 +01:00
Greg L. Turnquist
c9b5652833 Support for Query By Example based DataFetcher
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
2021-11-25 17:55:34 +00:00
Mingyuan Wu
d9404ea3d6 Upgrade to Spring Boot 2.6
Closes gh-187
2021-11-22 14:32:50 +01:00
Brian Clozel
02089a8542 Upgrade to Spring Boot 2.6.0-RC1
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
2021-11-09 09:39:14 +01:00
Mark Paluch
7fea8730db Migrate QuerydslDataFetcher to use fluent Querydsl API
Remove supporting classes for external projection as projections are
handled by Spring Data directly.

See gh-168
2021-10-27 16:51:21 +01:00
Rossen Stoyanchev
429f6f44bf Polishing
Show map-based batch loading first which is easier to implement without
having to order results.

Use JUnit named arguments in BatchMappingInvocationTests.

See gh-130
2021-10-05 10:15:20 +01:00
Rossen Stoyanchev
e0952a2791 Dependency upgrades for the Boot 2.5.5 release 2021-09-23 16:31:58 +01:00
Brian Clozel
02b16bdc65 Polish "Support contructor binding for input arguments"
Prior to this commit, only default constructors were supported for
instantiating input argument types. This commit adds a new
`GraphQlInstantiator` class that manages the instantiation and binding
of data fetching environment arguments. Default constructors and
primary constructors are now handled.

Also, List-like properties were not bound from the data fetching
environment arguments to the `MutablePropertyValues` used for binding.
This commit ensures that List elements are bound to the property values
with array-like property paths.

Fixes gh-139
Fixes gh-141
2021-09-21 09:45:45 +02:00
Rossen Stoyanchev
94809537cb Upgrade GraphQL Java 17.2 -> 17.3 2021-09-20 07:39:46 +01:00
Brian Clozel
762f59b2f3 Configure compiler conventions in modules
This commit applies the Compiler Conventions Gradle plugin to the
project modules and fix the issues raised by the compiler linter.

This commit also moves version management to the main build file for a
few dependencies, aligning the versions in the process.
2021-09-16 19:54:25 +02:00
Rossen Stoyanchev
892d2bd344 Use properties for Boot and GraphQL Java versions 2021-09-16 11:15:47 +01:00
Brian Clozel
73aec66200 Dependency upgrades
GraphQL Java 17.1 -> 17.2
Reactor -> 2020.0.9 -> 2020.0.10
Spring Data 2021.0.3 -> 2021.0.4
Spring Security 5.5.1 -> 5.5.2
Jackson 2.12.4 -> 2.12.5
AssertJ 3.19.0 -> 3.20.2
2021-08-27 11:01:55 +02:00
Rossen Stoyanchev
020303d0fd Dependency upgrades
GraphQL Java 17.0 -> 17.1
Reactor -> 2020.0.7 -> 2020.0.9
Spring Framework 5.3.7 -> 5.3.9
Spring Data 2021.0.1 -> 2021.0.3
Jackson 2.12.3 -> 2.12.4
2021-08-10 08:15:30 +01:00
Rossen Stoyanchev
317d75cc8a Upgrade to GraphQL Java 17.0
Closes gh-84
2021-08-03 10:25:57 +01:00
Rossen Stoyanchev
759b83ffa8 Upgrade to GraphQL Java 0.0.0-2021-07-21T06-48-56-713bb637
Use more efficient way to update the code registry in GraphQLSchema.

See gh-84
2021-07-21 13:52:49 +01:00
Rossen Stoyanchev
b22ac9bc1e Upgrade to GraphQL Java 17.0-beta1
See gh-84
2021-07-21 13:39:43 +01:00
Rossen Stoyanchev
706766536d Upgrade to GraphQL Java pre-17 version
See gh-84
2021-07-08 21:24:18 +01:00
Brian Clozel
f1bc239b57 Add Spring Security auto-configuration
This commit adds two new auto-configuration classes that provide the
relevant Spring Security infrastructure for GraphQL applications:

* a `ThreadLocalAccessor` that propagates the security context in
Spring MVC applications
* `DataFetcherExceptionResolver` implementations that resolve security
  exception from data fetchers, for both MVC and WebFlux

Closes gh-81
2021-07-06 16:58:34 +02:00
Rossen Stoyanchev
b594c19526 Add security package with basic infrastructure
Closes gh-80, gh-82
2021-07-06 15:38:16 +01:00
Brian Clozel
212392d73f Move version configuration to Gradle properties 2021-07-05 15:10:08 +02:00
Brian Clozel
34355051b5 Rename docs module
This commit renames the docs module to "spring-graphql-docs" to better
align with other Spring projects and their published docs artifact.
2021-06-30 18:16:27 +02:00
Brian Clozel
1727c7270a Set up reference documentation and JavaDoc
Closes gh-76
2021-06-30 17:59:45 +02:00
Mark Paluch
2d53fdc73f Spring Data repositories that support Querydsl
Spring Data repositories that support Querydsl are now supported
as DataFetchers returning single objects and iterables including
projection support.

See gh-59
2021-06-24 21:13:14 +01:00
Brian Clozel
57fb7c59f5 Fix build and disable jjavaformat + checkstyle
Right now the Spring JavaFormat and Checkstyle arrangement doesn't work
for the Spring GraphQL source code.

This commit disables the dedicated Gradle conventions until we find a
better solution.
2021-06-16 12:13:35 +02:00
Brian Clozel
f8b2ad552f Refactor project build
This commit refactors the project build to better share dependency
management definitions between modules.

This also upgrades the project to Spring Boot 2.5.0.

Closes gh-45
2021-06-02 15:45:51 +02:00
Brian Clozel
de369ceeb3 Switch to 1.0.0-SNAPSHOT version
This commit changes the current version from 0.1.0 to 1.0.0 SNAPSHOT in
order to reflect the milestone changes that were done on the project.
2021-05-31 21:42:50 +02:00
Brian Clozel
b48cacb10a Build projects with JDK8 target
Closes gh-36
2021-03-05 15:31:21 +01:00
Brian Clozel
43ba3e8fcd Remove GraphQL web starters
The GraphQL Spring Boot starters aren't actually necessary.
The typical GraphQL usage is really tied to the type of web application
you're building: Spring MVC or WebFlux.

Adding the `spring-graphql-web` dependency to the classpath is a signal
strong enough that we can configure additional endpoints into the web
application.

Closes gh-17
2020-11-13 11:51:49 +01:00
Brian Clozel
8a1bf9c388 Fix published POMs
This commit removes the dependencyManagement section from the published
POMs and aligns the starter dependencies with the official ones.
2020-11-13 11:51:09 +01:00
Brian Clozel
d7f3aa6fa9 Add Spring Milestone repository to build 2020-10-14 09:38:35 +02:00
Rossen Stoyanchev
cf1e3ce0da Upgrade to Spring Boot 2.4 snapshots
in order to make use of a recent change for WebMvc.fn in
Spring Framework 5.3.

See gh-6
2020-10-07 20:13:34 +01:00
Brian Clozel
b39f12ed4e Refactor Gradle build
This commit refactors the Gradle build with the following:

* use of the dependency management plugin
* import the Spring Boot BOM for dependency management
* add support for publishing artifacts
2020-09-15 14:10:35 +02:00
Andreas Marek
7829f109f8 upgrade to junit 5 2020-08-25 06:34:33 +01:00
Andreas Marek
932093ac34 refactor to use router functions, upgrade spring and gradle 2020-08-25 06:34:33 +01:00
Andreas Marek
7b549d7932 basic spring mvc and spring mvc starter integration which exposes a GraphQL endpoint 2020-08-25 06:34:33 +01:00