-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Labels
in: dataIssues related to working with dataIssues related to working with datastatus: supersededIssue is superseded by anotherIssue is superseded by anothertype: documentationA documentation taskA documentation task
Milestone
Description
Are you planning to support pagination, sorting and maybe also projections for querydsl and query by example? These are topics that also play a role for GraphQL APIs. The implementation of some attributes that go in that direction, but not all of them are supported yet, right?
The Builder
for the different DataFetchers are set to default values.
Snippet from QuerysldDataFetcher
@SuppressWarnings("unchecked")
Builder(QuerydslPredicateExecutor<T> executor, Class<R> domainType) {
this(executor,
ClassTypeInformation.from((Class<T>) domainType),
domainType,
Sort.unsorted(),
NO_OP_BINDER_CUSTOMIZER);
}
The attributes will be considered, but always have the same default values. Pagination is not supported but part of the QuerydslPredicateExecutor
interface. It would be possible if you want to support pagination.
Snippet from QuerysldDataFetcher
@Override
@SuppressWarnings("unchecked")
public Iterable<R> get(DataFetchingEnvironment env) {
return this.executor.findBy(buildPredicate(env), query -> {
FetchableFluentQuery<R> queryToUse = (FetchableFluentQuery<R>) query;
if (this.sort.isSorted()){
queryToUse = queryToUse.sortBy(this.sort);
}
if (requiresProjection(this.resultType)){
queryToUse = queryToUse.as(this.resultType);
}
else {
queryToUse = queryToUse.project(buildPropertyPaths(env.getSelectionSet(), this.resultType));
}
return queryToUse.all();
});
}
}```
Metadata
Metadata
Assignees
Labels
in: dataIssues related to working with dataIssues related to working with datastatus: supersededIssue is superseded by anotherIssue is superseded by anothertype: documentationA documentation taskA documentation task