I'll over explain, since others on the list reading may not understand what I'm 
talking about. The conversation that you referenced was for a module that has 
since been split into multiple modules, with the main module being added to 
Sling  here:

https://github.com/apache/sling-org-apache-sling-resource-filter

I struggle with terminology occasionally,  when people say "Query Language" 
there is usually a mental image of indexes and complex optimizations. What I 
did was far simpler in that I can convert any Query Language you want down to a 
simple true/false check against a resource. Combine that with a controlled 
traversal of a resources tree and you end up with the ability to handle queries 
in a way that may not be as fast as an indexed, optimized,  JCR-SQL2 query, but 
also  doesn't have the negative impact of accidentally triggering a full node 
traversal of your entire repository by accident. 

 I was debating internally whether the current Query Language that I 
implemented was good enough which is why I reached out. It's a bit wordy but it 
works in a logically consistent manner and  in a way that fits my use cases , 
so I'll probably keep it unless someone comes up with a good argument.

I think GraphQL would be fun to implement because it combines selection as well 
as defining  a result.   So I may just write a new module to handle that 
implementation.


- Jason

On Mon, Jul 2, 2018, at 5:36 AM, Radu Cotescu wrote:
> Hi Jason,
> 
> I’m getting old and start forgetting things, so a link would help. I 
> think you’re referring to [0].
> 
> Personally I’d like a GraphQL implementation in Sling, because it would 
> theoretically allow us to fetch all the resources needed to render a 
> page in one go. This way scripts can become a bit more declarative, in 
> the sense that each of them could provide a query they’d require to 
> execute in order to retrieve their data.
> 
> Cheers,
> Radu
> 
> [0] - 
> https://lists.apache.org/thread.html/928bb3dd3d142df462f0941dc73b7f656398468ff643694df035a84d@%3Cdev.sling.apache.org%3E
>  
> <https://lists.apache.org/thread.html/928bb3dd3d142df462f0941dc73b7f656398468ff643694df035a84d@%3Cdev.sling.apache.org%3E>
> 
> > On 29 Jun 2018, at 15:10, Jason E Bailey <[email protected]> wrote:
> > 
> > When I first wrote the Query Language used in the ResourceFilter I based it 
> > off of a "Resource Query Language" combined with a more familiar JCRSQL2 
> > syntax.  Effectively it's a 'key' = 'value' filter  combined with basic 
> > logic and grouping.
> > I looked at the SlingQuery implementation which is based off of JQuery, it 
> > has a cleaner syntax in a lot of cases but doesn't do some of the things I 
> > personally need like the ability to compare two properties. I'm working on 
> > getting ResourceFilter release ready and now is the time to make any 
> > changes to the language. Either additions, modifications, or adopting a new 
> > paradigm like an implementation  of GraphQL, because it's the new hotness. 
> > I was wondering if any of you had thoughts on the subject, strong opinions, 
> > or a wish list. 
> > 
> > TIA.
> > 
> > - Jason
> 

Reply via email to