@@ -300,12 +300,15 @@ default it is marked as `INTERNAL_ERROR`.
300
300
Spring GraphQL supports use of http://www.querydsl.com/[Querydsl] to fetch data through
301
301
the Spring Data
302
302
https://docs.spring.io/spring-data/commons/docs/current/reference/html/#core.extensions[Querydsl extension].
303
+ Querydsl provides a flexible yet typesafe approach to express query predicates by
304
+ generating a meta-model using annotation processors.
303
305
304
306
For example, declare a repository as `QuerydslPredicateExecutor`:
305
307
306
308
[source,java,indent=0,subs="verbatim,quotes"]
307
309
----
308
- public interface AccountRepository extends QuerydslPredicateExecutor<Account> {
310
+ public interface AccountRepository extends Repository<Account, Long>,
311
+ QuerydslPredicateExecutor<Account> {
309
312
}
310
313
----
311
314
@@ -330,6 +333,14 @@ If the repository is `ReactiveQuerydslPredicateExecutor`, the builder returns
330
333
`DataFetcher<Mono<Account>>` or `DataFetcher<Flux<Account>>`. Spring Data supports this
331
334
variant for MongoDB.
332
335
336
+ The Querydsl integration allows customizing the request parameters binding onto a
337
+ `Predicate` by accepting a `QuerydslBinderCustomizer`. Request parameters are bound
338
+ by default as "is equal to" for each available property in the request.
339
+
340
+ `QuerydslDataFetcher` supports
341
+ https://docs.spring.io/spring-data/commons/docs/current/reference/html/#projections[interface and DTO projections]
342
+ to transform query results before returning these for further GraphQL processing.
343
+
333
344
The {repository}/samples/webmvc-http[webmvc-http] sample in the Spring GraphQL repository
334
345
uses Querydsl to fetch `artifactRepositories`.
335
346
0 commit comments