wpengine / wp-graphql-filter-query

Adds taxonomy filtering and aggregation support to WP GraphQL
GNU General Public License v2.0
17 stars 1 forks source link

feat: 🎸 Add filter arg to Post queries & nest Taxonomy filters #6

Closed richard-wpengine closed 2 years ago

richard-wpengine commented 2 years ago

Added filters as child of where args as implementation of a sibling is an unknown for now. hardcoded a filterFields input type for both String & Integer but code is not very Dry there. Current implementation hardcodes for Tags & Categories on fields of 'name' & 'id' only. Ps. Branch ORN number (1036) is wrong, to avoid any confusion.

✅ Closes: ORN-1136

ToughCrab24 commented 2 years ago

Take a Look here, test_change_message is a parameterised test, and message_provider provides the data for the test https://github.com/wpengine/wp-content-engine/blob/bb27f9762153681793ce14781279e4986ae18c31/wordpress/atlas-search/tests/unit-tests/helper/sync/graphql/client.test.php#L144

the goal is to have a single test run multiple times by feeding it different data sets, so in the end we only need to write one test and provide data as test cases