dxa-web-application-java icon indicating copy to clipboard operation
dxa-web-application-java copied to clipboard

GraphQLQueryProvider doesn't filter items based on Categories and keywords

Open npokhare opened this issue 5 years ago • 3 comments

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

npokhare avatar Jun 13 '20 10:06 npokhare

See @ToDo in GraphQLQueryProvider.java

NIkonDSL avatar Dec 24 '20 15:12 NIkonDSL

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

npokhare avatar Feb 02 '21 11:02 npokhare

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

treaz avatar Feb 03 '21 21:02 treaz