I'm currently working on an integration using WPGraphQL and WooCommerce, and I was wondering if there’s an efficient way to retrieve all product attributes dynamically without knowing their names beforehand and without querying every product in the store.
The goal is to get a list of all possible attributes, but querying each product to extract them seems inefficient for larger stores. Is there a recommended method or an existing query for fetching all available attributes globally?
@mfa56 Sorry for the late response. You should checkout the collectionStats query it attempts to port the functionality of the product collection data endpoint of the WooCommerce Store API.
Hello,
I'm currently working on an integration using WPGraphQL and WooCommerce, and I was wondering if there’s an efficient way to retrieve all product attributes dynamically without knowing their names beforehand and without querying every product in the store.
The goal is to get a list of all possible attributes, but querying each product to extract them seems inefficient for larger stores. Is there a recommended method or an existing query for fetching all available attributes globally?
Thank you for your insights and assistance!