{"record":{"id":"8241e5da92a872a2","repo":"gatsbyjs/gatsby","slug":"the-updatepreview-callback-is-now-deprecated-an","errorCode":null,"errorMessage":"The ___updatePreview callback is now deprecated and will be removed in the future. Please use the __refresh callback instead.","messagePattern":"The ___updatePreview callback is now deprecated and will be removed in the future\\. Please use the __refresh callback instead\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-drupal/src/gatsby-node.ts","lineNumber":854,"sourceCode":"  {\n    app,\n    createNodeId,\n    getNode,\n    actions,\n    cache,\n    createContentDigest,\n    getCache,\n    reporter,\n  },\n  pluginOptions\n) => {\n  app.use(\n    `/___updatePreview/`,\n    bodyParser.text({\n      type: `application/json`,\n    }),\n    async (req, res) => {\n      console.warn(\n        `The ___updatePreview callback is now deprecated and will be removed in the future. Please use the __refresh callback instead.`\n      )\n      if (!_.isEmpty(req.body)) {\n        const requestBody = JSON.parse(JSON.parse(req.body))\n        const { secret, action, id } = requestBody\n        if (pluginOptions.secret && pluginOptions.secret !== secret) {\n          return reporter.warn(\n            `The secret in this request did not match your plugin options secret.`\n          )\n        }\n        if (action === `delete`) {\n          actions.deleteNode(getNode(createNodeId(id)))\n          return reporter.log(`Deleted node: ${id}`)\n        }\n        const nodeToUpdate = JSON.parse(JSON.parse(req.body)).data\n        return await handleWebhookUpdate(\n          {\n            nodeToUpdate,","sourceCodeStart":836,"sourceCodeEnd":872,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-drupal/src/gatsby-node.ts#L836-L872","documentation":"Fires in the Gatsby preview server when a request hits the /___updatePreview/ endpoint, which the plugin now registers only for backwards compatibility. The request is still processed, but callers should move to the /__refresh/ endpoint because ___updatePreview will be removed in a future release.","triggerScenarios":"Thrown at packages/gatsby-source-drupal/src/gatsby-node.ts:854 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update the sending side (Drupal preview integration) to POST to /__refresh/ instead of /___updatePreview/.","Upgrade the Drupal Gatsby module to a version that uses the __refresh endpoint.","No immediate action is strictly required — requests still work until the endpoint is removed."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}