wp-graphql / wp-graphql-tax-query

Adds `tax_query` support to postObject connection queries using WP_Query
46 stars 16 forks source link

Fix term arrays for ID & TAXONOMY_ID #23

Closed iamlili closed 1 year ago

iamlili commented 3 years ago

When querying by field ID or TAXONOMY_ID the results were incorrect because it was only using the last element in the original array

example: The following will only show posts that are in Category id 30 (it doesn't show those in 10 or 20)

posts( where: { taxQuery: { relation: AND taxArray: [ { terms: [10, 20, 30], field: ID, taxonomy: CATEGORY, operator: IN } ] } } )

dgaidula commented 2 years ago

Any chance we can this merged and a new release pushed out? I just got bit by this on a project and found this bug, but when I went to submit a pull request for the fix, I saw that this had already been submitted and approved.

eliawk commented 2 years ago

@jasonbahl could you please merge this?

guvkon commented 1 year ago

🎉