pimcore / data-hub

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

Query Filter should support $in. #189

Open SRaromicon opened 4 years ago

SRaromicon commented 4 years ago

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.

weisswurstkanone commented 4 years ago

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

juckerf commented 4 years ago

@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

aleksejs1903 commented 2 years ago

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

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

github-actions[bot] commented 10 months ago

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.