Introducing theme and theme file management in the Admin GraphQL API
API
Effective September 30, 2024
As of API version 2024-10, you can use the admin API to manage Online Store Themes. This feature provides parity with our REST API for managing themes and theme files.
What's New
New queries:
theme
to query an individual theme by IDthemes
to query many themes by role or name
OnlineStoreTheme
objects expose a files
query which can be used to fetch the metadata and content of files in a theme. Multiple files can be requested at once, speeding up operations that need to fetch many files.
New mutations for themes:
themeCreate
- upload a new themethemeDelete
- delete an unpublished themethemePublish
- publish a themethemeUpdate
- update the name of a theme
New mutations for theme files:
themeFilesCopy
- copy files from one location to anotherthemeFilesDelete
- delete files in a themethemeFilesUpsert
- write data to files in a theme
Learn more about these changes on Shopify.dev