This PR contains the migration to Spring Boot 2.7 M3 and uses the new offical "GraphQL for Spring" spring-graphql project. 🥳
it completly uses spring-graphql annotated controllers and doesn't use DataFetcher methods from graphql-java anymore
it uses Spring Security to force authentication when using graphql
it contains tests for all GraphQL controllers built using the new WebGraphQlTester from spring-graphql
see README for more information
Note:
included is a "new" React frontend that "better" shows Graphql capabilities than the traditional one (more Graphql-typical features)
configuration for mysql/postgres has been removed (we can add that later again)
implementations of repositories other than spring-data-jpa are not working fully yet! Both jdbc and jpa Repositoy implementation missing the OwnerReposiotry.findAll method that uses Spring Data pagination support that is used in the Query.owners field in GraphQL API. I'm not sure if it makes sense to keep three different repository implementations, as from the spring-graphql perspective, the implementation doesn't matter. Imho it would make more sense if we would add "Graphql-optimized" repositories, that for example generate optimized SQL queries based on an acutal GraphQL query. Anyway I think if desired, we can re-add the missing functionality in jdbc and jpa later or provide an owners field without pagination that has to be used with jdbc and jpa
this version does not use the embedded GraphiQL from spring-graphql, as I haven't manged it to implemented login in that embedded version (note that the whole /graphql endpoint is secured by Spring Security so that not even the introspection query that is required by GraphiQL is able to run without a valid token)
This PR contains the migration to Spring Boot 2.7 M3 and uses the new offical "GraphQL for Spring" spring-graphql project. 🥳
graphql-java
anymoreWebGraphQlTester
from spring-graphqlNote:
spring-data-jpa
are not working fully yet! Bothjdbc
andjpa
Repositoy implementation missing theOwnerReposiotry.findAll
method that uses Spring Data pagination support that is used in theQuery.owners
field in GraphQL API. I'm not sure if it makes sense to keep three different repository implementations, as from the spring-graphql perspective, the implementation doesn't matter. Imho it would make more sense if we would add "Graphql-optimized" repositories, that for example generate optimized SQL queries based on an acutal GraphQL query. Anyway I think if desired, we can re-add the missing functionality injdbc
andjpa
later or provide anowners
field without pagination that has to be used withjdbc
andjpa