data-hub icon indicating copy to clipboard operation
data-hub copied to clipboard

Query Filter should support $in.

Open SRaromicon opened this issue 6 years ago • 4 comments

This a feature request for an IN filter in filter query, so we can request multiple objects by e.g. an Array of IDs. Looking like:

query {
    getProductListing(filter: "{\"uniqueId\":  {\"$in\":  [\"1682940\", \"1684608\"]}}") {
      edges{
        node{
         uniqueId
        }
      }
    }
}

I think i should be a basic feature to support all Logic operators mentioned here.

SRaromicon avatar Apr 07 '20 08:04 SRaromicon

a PR would be nice 😄 see https://github.com/pimcore/data-hub/blob/1a640d6574efc82708aeee69f0cedcd1fc353888/src/GraphQL/Helper.php

weisswurstkanone avatar Apr 07 '20 08:04 weisswurstkanone

@SRaromicon in the meantime you can also try to use the POST_BUILD and PRE_LOAD events as described here https://github.com/pimcore/data-hub/blob/master/doc/graphl/Events.md#example-3-add-custom-arguments-to-existing-types

juckerf avatar May 04 '20 07:05 juckerf

maybe that would help someone, you can also use $or instead:

filter: "{ \"$or\": [ { \"uniqueId\": \"1682940\" }, { \"uniqueId\": \"1684608\" } ] }"

aleksejs1903 avatar Feb 11 '22 09:02 aleksejs1903

Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.

github-actions[bot] avatar Jan 21 '24 07:01 github-actions[bot]