-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Accessing meta_data product property? #121
Comments
Haven't implemented it yet, however I am putting this in the v0.2.1 milestone. I have implemented the |
@stefanos82 would it be possible for you do create a potential query? I'm still making decision what would work best for a meta data query. |
When you say create a potential query? I barely know how to use GraphQL to be honest with you 😞 |
@stefanos82 if you were to have a component that was asking for data, how would you expect that query to look? Mocking the shape of Queries can help identify issues before implementation. |
@jasonbahl You mean something like this? {
products {
edges {
node {
sku
name
status
manageStock
regularPrice
salePrice
dateOnSaleFrom
dateOnSaleTo
stockQuantity
taxClass
metaData {
key {
internalCode
uom
}
}
}
}
} The thing is, I want my I hope it makes sense 🤔 |
@stefanos82 so since you want to filter by keys maybe something like.
and you would receive back an array that looks like this for the
Any other suggestions? |
I guess we need interoperability between REST API and WPGraphQL so there's a consistency between the two. The same fields we see from WC REST API would be ideal to have (more or less with the same syntax) in WPGraphQL. It would be nice to generate REST API keys and use them with WPGraphQL as well. I'm asking such feature, because I have a customer with a POS system that I send its data on a live website via REST API. It takes around 1.7-ish seconds though to create a batch of 10 products and I would like to drop that speed as low as possible with the help of GraphQL. Just see how many unnecessary data it retrieves that I don't really need: retrieve a product With GraphQL I'm sure it would improve exponentially and I can't wait to figure out how to make it reality. |
Do we have meta_data product property, much like WC REST API?
I have tried the following which works just fine, but I'm missing the
meta_data
product property...The text was updated successfully, but these errors were encountered: