How can I query a theme list using Graphql in a Remix app?

The suggested onboarding UX for App Blocks suggest showing a select list of all installed themes.

However I do not find any Graphql API for querying themes.

Any pointers on how to query that from my App’s app._index.tsx ?

Context: I am developing a Remix app.

Did you find any information on the “select theme” part ?

I’ve got a similar issue:

rejected for “no-functionnal UI”

I can show a Select input, but how to fill it with theme list options ?

Hi, Since I wasn’t able to find a GraphQL API to get list of themes, I used the following URL in my link instead:

https://${appDomain}/admin/themes/current/editor?context=apps&template=product&addAppBlockId=${extensionId}/${extensionName}&target=mainSection

This neatly directs you to theme editor for the current theme

thank you.

for future reference and other poeple, I’ve listed installed themes via the REST api instead inside the loader function :

export const loader = async ({ request }) => {
  const { admin, session } = await authenticate.admin(request);
  
  const shopData = await admin.rest.resources.Shop.all({ session: session });
  const d= shopData?.data[0].domain;

  const themeData = await admin.rest.resources.Theme.all({ session: session });
  const themes = themeData?.data;

  return json({ domain :d, themes});
};

export default function Index() {
  const shopInfos = useLoaderData();
  const shopDomain = shopInfos.domain;
  const themesArray = shopInfos.themes;
...