I have noticed by building Queries as follow
QueryRoot queryRoot = QueryRoot.builder().paging(paging).targetDocumentModel(documentReference.getDocumentModelName())
.constraint(constraints).projectionName("document").build();
that the constraint method comes from AbstractQueryTopology which is an internal api.
Can data-services provide a public method instead?
Hi @nicolas-cool-mesh ,
If you use QueryRoot.builder()… it creates an instance of a publicly available QueryRootBuilder class that inherits the public .constraint(). That means you call a publicly available one, so don’t be worried; you call the public API in this case.
Hello @petr-high-peak
The developers are using too much internal apis for various reasons on my project.
This is very problematic when we try to upgrade the platform.
To reduce this risk in future.
I have introduced this following gradle plugin on my project
https://github.com/policeman-tools/forbidden-apis
because I can define internal apis as forbidden apis with the following rules 
**.a12internal.** @A12 internal packages are not allowed
**.a12.**.internal.** @A12 internal packages are not allowed
But the tool complains a lot about this constraint Methode because it is analysing the byte code.
The tool is correct because the constraint Method is implemented in AbstractQueryTopology which is internal as you can see on the screenshot.
I have handled the issue with annotations for now. But I would really prefer the constraint Method to be implemented in a public class. I would then not have to manage this kind of exceptions.
Thanks in advance for your understanding.