Skip to content

"taxArray" does not work correctly if an empty array or null is passed to "terms" with "operator" IN #39

@relaxdd

Description

@relaxdd

It is assumed that if we pass a null or an empty array, then the tax query should not work in principle, but in this case it works and returns nothing, so it should not be, given that I cannot dynamically change the graphql query based on the number of elements in the array, so I would have to hack it. invert the query and base it on the "exclude" field


Предполагается что если мы передаем null или пустой массив то tax query не должен отрабатывать в принципе, но в этом случае он отрабатывает и ничего не возвращает, так не должно быть учитывая что я никак не могу динамически менять graphql запрос основываясь на кол-ве элементов в массиве, по этому что бы исправить это мне придется инвертировать запрос и основываться на поле "exclude"


Версия WPGraphQL: 2.0.0
Версия WPGraphQL Tax Query: 0.2.0

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions