{"record":{"id":"cc1e44f510d75bd4","repo":"gatsbyjs/gatsby","slug":"expected-an-id-in-the-format-gid-shopify-typena","errorCode":null,"errorMessage":"Expected an ID in the format gid://shopify/<typename>/<id>","messagePattern":"Expected an ID in the format gid://shopify/<typename>/<id>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-shopify/src/process-bulk-results.ts","lineNumber":86,"sourceCode":"          const field = shopifyTypes[childType].key\n\n          if (field) {\n            result[field] = [\n              typeof child === `string`\n                ? createNodeId(child, gatsbyApi, pluginOptions)\n                : child,\n              ...((result[field] || []) as Array<unknown>),\n            ]\n          } else {\n            throw new Error(\n              `There is no shopifyType for child type: ${childType}`\n            )\n          }\n        }\n      }\n\n      if (!isShopifyId(result.shopifyId)) {\n        throw new Error(\n          `Expected an ID in the format gid://shopify/<typename>/<id>`\n        )\n      }\n\n      const node = {\n        ...result,\n        id: createNodeId(result.shopifyId, gatsbyApi, pluginOptions),\n        internal: {\n          type: `${pluginOptions.typePrefix}Shopify${type}`,\n          contentDigest: gatsbyApi.createContentDigest(result),\n        },\n      } as IShopifyNode\n\n      if (pluginOptions.downloadImages && imageFields) {\n        promises.push(\n          processShopifyImages(gatsbyApi, node).then(() =>\n            gatsbyApi.actions.createNode(node)\n          )","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-shopify/src/process-bulk-results.ts#L68-L104","documentation":"After assembling a node from bulk results, process-bulk-results validates that result.shopifyId matches the Shopify gid format (gid://shopify/<typename>/<id>) via isShopifyId. If it does not, the plugin cannot synthesize a stable Gatsby node id and throws. The gid is the canonical identity across the Shopify sourcing pipeline.","triggerScenarios":"A bulk result object lacks an id field; id field is a plain integer or non-gid string; __typename maps to a typename that does not appear in the gid; upstream Shopify data returns a malformed or partial gid.","commonSituations":"Custom mutations on Shopify returning non-standard ids; third-party app overriding the id field; querying a type whose bulk export omits id; bulk result line corrupted by truncation.","solutions":["Inspect the JSONL bulk result line that produced the node to see the actual id value.","Ensure queries include the `id` field for every type sourced from bulk operations.","Confirm the Shopify object genuinely has a gid (custom objects may not).","Filter out objects whose id does not match gid://shopify/... before they reach this builder."],"exampleFix":"null","handlingStrategy":"validation","validationCode":"function isShopifyId(id) { return /^gid:\\/\\/shopify\\/[A-Za-z]+\\/\\d+/.test(id) }\nif (!isShopifyId(result.shopifyId)) { reporter.warn('Non-gid id encountered; skipping node'); return }","typeGuard":"const isShopifyGid = (id) => typeof id === 'string' && /^gid:\\/\\/shopify\\/[A-Za-z]+\\/\\d+$/.test(id)","tryCatchPattern":"try { buildNode(result) } catch (e) { if (/Expected an ID in the format gid:\\/\\/shopify/.test(e.message)) { reporter.warn('Skipping non-gid Shopify object'); return } throw e }","preventionTips":["Ensure every sourced type includes the id field in its query","Filter out objects with malformed ids at ingest time","Monitor bulk result lines for unexpected id shapes"],"tags":["shopify","validation","id","data"],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}