pimcore / data-hub

Data delivery & consumption platform for Pimcore.
Other
127 stars 108 forks source link

[Feature]: Implement PQL as filter in graphql queries and deprecate current json-based filter implementation #891

Open fashxp opened 1 month ago

fashxp commented 1 month ago

Feature description

to use PQL for defining filters instead of the current json syntax. see also https://pimcore.com/docs/platform/Datahub/GraphQL/Query/Filtering

For simplicity, parallel filtering of PQL and json syntax is not necessary. Can be either or and throw an exception if both is set.

mcop1 commented 2 weeks ago

Unfortunately not as easy as it seems at first glance. Problem is, that we need to add generic-data-index as a dependency. Adding it as a suggestion wont be enough, because we need to know the types and interfaces to use them in use statements or in return / parameter types. Technically we could use interface_exists checks and optional dependency to make it work, but that would result in a lot of duplicated code for the time being. My suggestion would be to deprecate the current filter implementation and add the dependency to generic-data-index with the next major version. Or if there needs to be a transitional phase, then remove it in a later version, after the next major release.