Definitions Copier
Copy your custom data definitions (metafields and metaobjects) from one Shopify store to another, for example from a development store to your live store. Or find unused definitions and remove them safely.
What you’ll need
Access to both stores in your Shopify admin
How to get this: Access to both stores in your Shopify admin
- Sign in at admin.shopify.com with the account you use for your store.
- If you are staff rather than the owner, ask the owner to give you both stores permission in Settings › Users.
Shopify’s free GraphiQL app (with installed on both stores, with read_metaobject_definitions and the write access for each type you copy access)
How to get this: Shopify’s free GraphiQL app
- Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
- Then open it any time from Apps › Shopify GraphiQL App in your admin.
1Export definitions from store A
Run each query in Shopify’s GraphiQL app on the store you’re copying from and paste every result into the box (one after another is fine). Read scopes: read_metaobject_definitions, read_products, read_customers, read_orders, read_online_store_pages, read_content.
Pick fewer if Shopify says the query costs too much.
Queries (9)
query MetaobjectDefinitions {
metaobjectDefinitions(first: 25) {
nodes {
id
type
name
description
displayNameKey
access { admin storefront customerAccount }
capabilities {
publishable { enabled }
translatable { enabled }
renderable { enabled data { metaTitleKey metaDescriptionKey } }
onlineStore { enabled data { urlHandle canCreateRedirects } }
}
fieldDefinitions {
key
name
description
required
type { name }
validations { name value }
capabilities { adminFilterable { enabled } }
}
standardTemplate { type }
createdByApp { title }
metaobjectsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_PRODUCT {
PRODUCT: metafieldDefinitions(ownerType: PRODUCT, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_PRODUCTVARIANT {
PRODUCTVARIANT: metafieldDefinitions(ownerType: PRODUCTVARIANT, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_COLLECTION {
COLLECTION: metafieldDefinitions(ownerType: COLLECTION, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_CUSTOMER {
CUSTOMER: metafieldDefinitions(ownerType: CUSTOMER, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_ORDER {
ORDER: metafieldDefinitions(ownerType: ORDER, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_PAGE {
PAGE: metafieldDefinitions(ownerType: PAGE, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_ARTICLE {
ARTICLE: metafieldDefinitions(ownerType: ARTICLE, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}query MetafieldDefinitions_SHOP {
SHOP: metafieldDefinitions(ownerType: SHOP, first: 25) {
nodes {
id
name
namespace
key
description
ownerType
type { name }
validations { name value }
pinnedPosition
access { admin storefront customerAccount }
capabilities {
adminFilterable { enabled }
smartCollectionCondition { enabled }
uniqueValues { enabled }
}
constraints { key values(first: 50) { nodes { value } } }
standardTemplate { id name }
metafieldsCount
}
pageInfo { hasNextPage endCursor }
}
}No store handy?
2What store B already has Recommended
Run the same queries on the store you’re copying to and paste the results. Definitions it already has are skipped, and different ones are flagged instead of overwritten.
3Check the plan and run it on store B
4Check the results
Paste what GraphiQL showed after each batch (or the files the CLI script saved). You can paste several.
2Choose what to remove
How it works
- Run the read-only export queries in GraphiQL on store A and paste the results.
- Optionally do the same on store B, so existing definitions are skipped.
- Check the plan: what will be created, in which order, and what is skipped and why.
- Tick the confirm box, run batch 1 on store B, paste the result, then run the rest.
- Paste every result back. Failed items get a re-run batch; an undo removes only what was created.
Guides
Questions
Does this connect to my stores?
No. It writes read-only queries and create mutations; you run them yourself in Shopify’s GraphiQL app (or Shopify CLI) on each store and paste the results here.
Can it break store B?
Copying only creates definitions. It never edits or deletes existing ones, and it skips anything store B already has. Run it on a development store first, and run batch 1 alone before the rest.
Does it copy the values and entries?
No, only the definitions (the schema). Move metaobject entries with the Metaobject CSV Bridge and product metafield values with a product CSV.
What about app definitions?
Definitions owned by apps (app-- namespaces and types) can only be created by that app. Install the app on store B and it adds them.
Based on Shopify’s metafieldDefinitionCreate, metaobjectDefinitionCreate, validation options and metafieldDefinitionDelete. Try a development store first.