RWS / dxa-web-application-java

SDL Digital Experience Accelerator Java Spring MVC web application
25 stars 37 forks source link

GraphQLQueryProvider doesn't filter items based on Categories and keywords #129

Open npokhare opened 4 years ago

npokhare commented 4 years ago

When we create an object of type SimpleBrokerQuery see below: https://github.com/sdl/dxa-web-application-java/blob/05cb742c88d819310ee029702f440ee2ecf45c4d/dxa-framework/dxa-common-api/src/main/java/com/sdl/webapp/common/api/model/query/SimpleBrokerQuery.java#L12 we pass in keywordFilters. This keywordFilters are not used to build the inputItemFilter in graphql query provider(https://github.com/sdl/dxa-web-application-java/blob/05cb742c88d819310ee029702f440ee2ecf45c4d/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/broker/GraphQLQueryProvider.java#L91)

In earlier implementation (non GraphQL implementation) keywordFilters were used and it was able to get component filtered by keywords,

more info :https://github.com/sdl/dxa-web-application-java/blob/05cb742c88d819310ee029702f440ee2ecf45c4d/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/mapping/impl/DefaultContentProvider.java#L282

NIkonDSL commented 3 years ago

See @ToDo in GraphQLQueryProvider.java

npokhare commented 3 years ago

Hi I see that there is a solution added to https://github.com/sdl/dxa-web-application-java/blob/master/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/broker/GraphQLQueryProvider.java But the code is commented, https://github.com/sdl/dxa-web-application-java/blob/master/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/broker/GraphQLQueryProvider.java#L105

Is this purposeful. Waiting for your answer @treaz

treaz commented 3 years ago

I don't remember when I closed this issue. Must be an accident. @alebastrov do you have any thoughts on the question of @npokhare