A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi!
Our app helps our merchants upload assets (mostly images, and a small bit of merchant customizable CSS) that are displayed with a Proxy App. We use the AssetAPI to allow Shopify to host these files because they are part of the storefront.
It does not appear that the Theme App extension allows for per-merchant assets similar to this.
The alternatives listed here do not talk about this use case.
We understand there is a FileAPI, but it is currently GraphQL only. Is that a suitable place to host these files? Any chance that will also be added to the REST API?
That URL should be: https://shopify.dev/docs/apps/online-store/other-integration-methods/asset
Below is what support says. (if you like the REST API, comment here, or submit a new support request).
I ran your question past my internal team to see if they may have any other insight we can provide. We looked into it and this does seem to be one of those scenarios where there isn't exact parity between GraphQL and REST for adding files to the store.
We have got our fileCreate mutation which would put files into the Files area of the store instead of the theme assets directory. I am submitting feedback for this as if we do get enough demand/requests it may be something we can add in the future to REST, however I know there are more resources/support being geared towards GraphQL these days so it may worth looking into these options as well in case you'd be able to make use of the fileCreate/fileUpdate/fileDelete mutations.