spring-projects / spring-graphql

Spring Integration for GraphQL
https://spring.io/projects/spring-graphql
Apache License 2.0
1.53k stars 305 forks source link

Add support for `QueryByExampleExecutor` and `ReactiveQueryByExampleExecutor` #115

Closed mp911de closed 2 years ago

mp911de commented 3 years ago

With the current functionality, we support Querydsl as technology to formulate and run dynamic queries. Querydsl requires Q-classes that are typically generated using the Querydsl annotation processor and external dependencies during runtime to enable query construction.

Spring Data provides a Query by Example query interface that doesn't require external dependencies providing a much simpler interface across multiple store modules. It would make sense to explore Query by Example support as an alternative to Querydsl.

Diluka commented 3 years ago

if all the query args in a filter mongo-like object is great

{
  todoItems(filter: {completed: {is: true}}){
    # ...
  }
}
mp911de commented 3 years ago

Spring GraphQL is a library to create APIs regardless of the underlying database technology. We do not want to tie the schema so much to what technology is backing a particular type. By using the Querydsl integration, you can customize how values translate to predicates.

rstoyanchev commented 2 years ago

Superseded by #191.