Accessing asset files through GraphQL API

Accessing asset files through GraphQL API

Danh11
Shopify Partner
87 2 39

I've noticed that the REST API has access to assets but GraphQL does not. 

Can anyone from Shopify comment on when this will be available? It seems like such a shortfall in using GraphQL.

Replies 7 (7)

Don
Shopify Staff
2787 199 398

Hi there @Danh11!

 

I just wanted to let you know your post has been moved here to our dedicated API forums.

 

These threads are monitored and responded to by our own developers and Partners, so this is really the best place for this kind of query.

 

If you haven't already you can browse our API docs here for GraphQL resources.

 

All the best!

Don | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Danh11
Shopify Partner
87 2 39

So I get that you can't access assets via GraphQL, but it's massively frustrating seeing you don't have any docs on how to get Rest setup in a React app. Everything has moved to GraphQL. I'm sure it's not hard for an experienced developer to get it going, but as a junior it's pretty frustrating. 

Are there any plans to enable access to assets via GraphQL?

Schmidtc63
Shopify Partner
100 14 28

It's incredibly frustrating that Shopify is pushing graphql but you don't provide graphql support for all the same entities. Where's graphql assets? Collects? Etc. I would love to use gql for everything but you've not made that possible. 

StevieC
Shopify Partner
2 0 1

+1 to the comments by @Danh11 and @Schmidtc63 - I was somewhat perplexed when I found out this could only be accessed via Rest. Unless it's so deeply nested no one can find it? 

jam_chan
Shopify Partner
925 23 188

I'm looking for the same. 

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

jam_chan
Shopify Partner
925 23 188

When I have several asset files to be updated at once, any possible way is available to speed up the process?

BYOB - Build Your Own Bundles, SPO - SEO App to research keywords & edit social link preview

alexz
Shopify Partner
5 0 4

I think this is now possible using `themeFilesUpsert` in the GraphQL Admin API, 2024-10 release.

 

Here's the announcement from Shopify:

https://shopify.dev/changelog/introducing-theme-and-theme-file-management-in-the-admin-graphql-api

 

Unfortunately, it appears to have been released broken:

https://community.shopify.com/c/shopify-apps/write-themes-assets-access-needed-but-it-does-not-exist...