Need help updating shop name/title via Admin API GraphQL mutations

I’m trying to update a shop’s name/title via the Admin API GraphQL mutations, but running into issues. I’ve tried several approaches, all resulting in different errors.

I am using API Version 2024-10

Here’s what I’ve attempted:

Attempt 1: Using shopUpdate mutation

mutation UpdateShopName {
  shopUpdate(input: { name: "New Shop Name" }) {
    shop {
      name
    }
    userErrors {
      field
      message
    }
  }
}

Error:

{
  "errors": [
    {
      "message": "Field 'shopUpdate' doesn't exist on type 'Mutation'",
      "locations": [{"line": 2, "column": 11}],
      "extensions": {
        "code": "undefinedField",
        "typeName": "Mutation",
        "fieldName": "shopUpdate"
      }
    }
  ]
}

Attempt 2: Using variables with shopUpdate

mutation UpdateShopName($input: ShopInput!) {
  shop(input: $input) {
    shop {
      name
    }
    userErrors {
      field
      message
    }
  }
}

Error:

{
  "errors": [
    {
      "message": "ShopInput isn't a defined input type (on $input)",
      "locations": [{"line": 1, "column": 25}],
      "extensions": {
        "code": "variableRequiresValidType",
        "typeName": "ShopInput",
        "variableName": "input"
      }
    },
    {
      "message": "Field 'shop' doesn't exist on type 'Mutation'",
      "locations": [{"line": 2, "column": 11}],
      "extensions": {
        "code": "undefinedField",
        "typeName": "Mutation",
        "fieldName": "shop"
      }
    }
  ]
}

Attempt 3: Using shopSettingsUpdate

mutation updateShopSettings {
  shopSettingsUpdate(input: { name: "New Shop Name" }) {
    shop {
      id
      name
    }
    userErrors {
      field
      message
    }
  }
}

Error:

{
  "errors": [
    {
      "message": "Field 'shopSettingsUpdate' doesn't exist on type 'Mutation'",
      "locations": [{"line": 2, "column": 11}],
      "extensions": {
        "code": "undefinedField",
        "typeName": "Mutation",
        "fieldName": "shopSettingsUpdate"
      }
    }
  ]
}

What works (but not what I need)

The only thing that works is updating the SEO title via metafields:

mutation metafieldsSet($metafields: [MetafieldsSetInput!]!) {
  metafieldsSet(metafields: $metafields) {
    metafields {
      id
      namespace
      key
      value
    }
    userErrors {
      field
      message
    }
  }
}

With variables:

{
  "metafields": [
    {
      "ownerId": "gid://shopify/Shop/7634793",
      "namespace": "global",
      "key": "title_tag",
      "value": "New Shop Name"
    }
  ]
}

This successfully updates the SEO title, but I also need to update the shop name that appears in the Shopify admin preferences (Online Store > Preferences).

Questions:

  1. What is the correct mutation to update a shop’s name in the admin preferences?
  2. Are there any specific scopes required for this operation? I currently have write_content, write_products, read_content, read_products, read_translations but none of these seem to work
  3. Is there a different API version I should be using? (Currently using 2024-10)

Any help would be greatly appreciated! :folded_hands:

Additional Context:

  • Using the Admin API via GraphQL
  • Access token has write permissions
  • Successfully able to update other shop settings
  • API Version: 2024-10

From checking the latest API version, there is no API to update a shop.

I am able to change the meta title but it doesn’t flow to the shop name. Very frustrating!

Thanks @Luke

No API currently supports modifying store names.

Thanks @kyle_liu

To clarify, I am trying to change the home page title and meta description (not the store name). I still haven’t found a way to do this but will keep trying.

You won’t be able to, there is no API to update this information.

Thanks @Luke, that’s a bummer.