Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to dynamically retrieve all attributes without querying all products? #892

Open
mfa56 opened this issue Sep 20, 2024 · 1 comment
Labels
awaiting author response Awaiting response from Issue/PR author question Further information is requested

Comments

@mfa56
Copy link

mfa56 commented Sep 20, 2024

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!

@kidunot89
Copy link
Member

@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.

@kidunot89 kidunot89 added the question Further information is requested label Oct 2, 2024
@kidunot89 kidunot89 added the awaiting author response Awaiting response from Issue/PR author label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting author response Awaiting response from Issue/PR author question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants