You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know if this is a bug or a feature request. That's why I am writing here.
I want to use the Shopify Storefront GraphQL API. I created some custom metafields for this. But while I build my query I found no option to get those blog article metafields with Storefront API.
But with GraphQL there is no field metafields on an articleQuery. I tried it like:
static func allArticles() -> Storefront.QueryRootQuery {
return Storefront.buildQuery { (queryRootQuery) in
queryRootQuery.articles(first: 250, { (articleConnectionQuery) in
articleConnectionQuery.edges({ (articlesEdgeQuery) in
articlesEdgeQuery.node({ (articleQuery) in
articleQuery.id().NO_METAFIELDS?
})
})
})
}
}
On products instead I can read the metafields on the position where I wrote NO_METAFIELDS? above. So do I need to use REST for this and have my code half written in REST and half written in GraphQL?
The text was updated successfully, but these errors were encountered:
@rebeccajfriedman So there is no way to get blog article metafields with a mobile App?
The two solutions I think of:
Use Admin API. Problem: Security.
If I use Admin API I have to store login data in my application code. Is there any problem doing this if the only permission is read access on store content? Is there anything a user would not be able to read with Storefront API?
Set up my own backend just to store metafield information I am going to read from.
Hello @rebeccajfriedman, will the support be there anytime soon? Because I don't want to invest to another backend service just to retrieve a metafield, if this new backend is going to be obsolete in the next three months.
Hey there,
I do not know if this is a bug or a feature request. That's why I am writing here.
I want to use the Shopify Storefront GraphQL API. I created some custom metafields for this. But while I build my query I found no option to get those blog article metafields with Storefront API.
First, the REST API request:
"https://myapp.myshopify.com/admin/blogs/BLOG_ID/articles/ARTICLE_ID/metafields.json"
But with GraphQL there is no field metafields on an articleQuery. I tried it like:
On products instead I can read the metafields on the position where I wrote
NO_METAFIELDS?
above. So do I need to use REST for this and have my code half written in REST and half written in GraphQL?The text was updated successfully, but these errors were encountered: