gatsbyjs/gatsby · error
There is no shopifyType for child type: ${childType}
Error message
There is no shopifyType for child type: ${childType} What it means
While building node relationships in process-bulk-results, for each child reference the plugin looks up shopifyTypes[childType].key to decide which field on the parent to populate. If childType is not a known Shopify type (no entry in the shopifyTypes map), the key is undefined and the helper throws. childType comes from parseShopifyId or the child's __typename.
Source
Thrown at packages/gatsby-source-shopify/src/process-bulk-results.ts:78
// Attach children references / objects
if (children[result.shopifyId]) {
for (const child of children[result.shopifyId]) {
const childType =
typeof child === `string`
? parseShopifyId(child)[1]
: (child.__typename as string)
const field = shopifyTypes[childType].key
if (field) {
result[field] = [
typeof child === `string`
? createNodeId(child, gatsbyApi, pluginOptions)
: child,
...((result[field] || []) as Array<unknown>),
]
} else {
throw new Error(
`There is no shopifyType for child type: ${childType}`
)
}
}
}
if (!isShopifyId(result.shopifyId)) {
throw new Error(
`Expected an ID in the format gid://shopify/<typename>/<id>`
)
}
const node = {
...result,
id: createNodeId(result.shopifyId, gatsbyApi, pluginOptions),
internal: {
type: `${pluginOptions.typePrefix}Shopify${type}`,
contentDigest: gatsbyApi.createContentDigest(result),View on GitHub (pinned to 8b06340921)
Solutions
- Upgrade gatsby-source-shopify to a version whose type map includes the type seen in error (the message names the childType).
- Confirm apiVersion matches a Shopify Admin API version that produces the expected typenames.
- Inspect the offending bulk result JSONL line to see the unexpected __typename and report it upstream if it is a genuine Shopify type.
- If running a fork, extend the shopifyTypes map with the missing type and its key.
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
const knownTypes = ['Product', 'ProductVariant', 'Collection', 'Order', 'Customer']
if (!knownTypes.includes(childType)) { reporter.warn(`Unknown Shopify child type: ${childType}`); return } Type guard
const isKnownShopifyType = (t, shopifyTypes) => Boolean(shopifyTypes[t] && shopifyTypes[t].key)
Try / catch
try { buildRelationship(child) } catch (e) { if (/no shopifyType for child type/.test(e.message)) { reporter.warn(`Skipping unknown child type: ${childType}`); return } throw e } Prevention
- Keep gatsby-source-shopify and the Shopify apiVersion in sync
- Inspect bulk result JSONL for unexpected __typenames during staging
- Watch the plugin changelog when upgrading apiVersion
When it happens
Trigger: Bulk results reference a Shopify type the plugin's type map does not include (e.g. a new type added by Shopify, or a custom type); __typename on a child does not match any registered Shopify type; parseShopifyId returns an unexpected typename from a malformed gid.
Common situations: Shopify introduces a new type not yet covered by the plugin version in use; apiVersion mismatch causing __typename differences; custom Shopify extensions injecting non-standard types; corrupted gid strings producing strange typenames.
Related errors
- Expected an ID in the format gid://shopify/<typename>/<id>
- response.statusText
- Operation ${id} failed with ${errorCode}
- Could not parse file extension from Shopify image URL: ${url
AI-assisted analysis of gatsbyjs/gatsby@8b06340921 (2026-08-13).
Data as JSON: /api/errors/b54a7a976973dee6.
Report an issue: GitHub.