I did a lot of upgrades to use newer versions of libraries etc.:
Spring Boot 3.2 with latest Spring for GraphQL
JDK 21
Latest React and Apollo libs for the client (also switched to Vite as build tool)
Also I added some more GraphQL-related examples:
Using the new pagination support of Spring Data and Spring for GraphQL for Cursor-based pagination (I think it has been added in Spring Boot 3.1 already)
Improved Subscription example: there is now an integration test for the GraphQL subscription and also the frontend makes use of the subscription
Customized GraphiQL: Spring for GraphQL allows us to replace the unmodified GraphiQL by a customized one. I used this feature to build a customized GraphiQL that provides a way to login, as for the PetClinic GraphQL API a valid token is always required.
The following changes are not GraphQL-related but I think they reflect a modern Spring (Boot)-based application:
use Spring Boot's Docker Compose support when starting the application in dev mode
inside the Integrationtest TestContainers are used with Spring's new ServiceConnection feature
to make the setup a little more realistic, I removed hsql and replaced it by a Postgres database (that is automatically started using Spring's Docker Compose support and setup and populated using Flyway).
I removed some of the Repository infrastructure. All repositories are now Spring Data JPA only. I think for this example application that is sufficient.
Backend and frontend are communicating through a proxy, so that no CORS setup is needed anymore. During local development, the Vite devserver and in "production" an nginx acts a as reverse proxy.
I added some end-to-end-Browsertests with Playwright
Inside the GitHub workflow pipeline, Docker Images for backend and frontend are built. The pipeline runs the end-to-end tests against a docker-compose setup with Postgres, Backend and Frontend.
I did a lot of upgrades to use newer versions of libraries etc.:
Also I added some more GraphQL-related examples:
The following changes are not GraphQL-related but I think they reflect a modern Spring (Boot)-based application:
ServiceConnection
featureFor more information see the readme file.