What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Accessing Liquid Theme via GraphQL/API?

Accessing Liquid Theme via GraphQL/API?

1Q5u
Visitor
2 0 0

I got data that should be displayed and saved as a product for the client. However the data isn't really products, more like events. So I will add metafields so I can customize the data to my needs.

I will not know which Theme the user is currently using, so the plan is to make a custom page for those collections which display the products like events.
The issue is, that if I would just let them be displayed in any theme, the product fields would not get shown by the template.

Is there a way to modify templates via GraphQL or an API from my application (app/server)?

Is there another way to solve this?

Since all of the content has to be SEO ready, I can not rely on loading everything client side with Javascript from our API. (which would be really easy...)

Replies 2 (2)

Visely-Team
Shopify Partner
1843 210 488

You can do that through - https://shopify.dev/docs/admin-api/rest/reference/online-store/asset?api[version]=2020-07

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
1Q5u
Visitor
2 0 0

Any idea if I can dynamically load in these assets with some JS or similar, since I can not add them via the asset_url() ?