Get a new field on Metaobject object - assignableTemplates

This is a feature request - to get a new field on metaobject on graphql, Metaobject - GraphQL Admin. The templateSuffix gives your the currently assigned template suffix name, but there is no easy way to get all assignable templates, other than requesting theme access scope and querying the theme directly.
Would be great to have a list of available template suffixes here.

1 Like

Hey @Taksh_Shah - you’re correct that templateSuffix only gives you the currently assigned template and there’s no field on the Metaobject or MetaobjectDefinition objects to retrieve the list of available templates for that type.

The only way to get that information right now is to request the read_themes scope and query the theme’s asset list for files matching templates/metaobject/{type}*.json, which is the workaround you already identified. The metaobject theme templates docs cover where those files live in the theme directory.

I’ve gone ahead and submitted this as a feature request on your behalf. The more a specific feature is requested by our merchants and partners, the more likely it is to be considered for future development by our product teams so hopefully this can be added in the future - thanks for raising it!

1 Like