I always get the the release and not the latest draft from prismic in preview mode

Describe your question/issue in detail

I can't get the draft preview but only the release. I'm using express.js

I don't know how to debug this.

Impacted feature


What steps have you taken to resolve this issue already?

Checked cookies, routes, etc.

Your Role


Hosting provider


Package.json file

  "name": "prismic-site",
  "type": "module",
  "version": "0.0.1",
  "scripts": {
    "dev": "NODE_ENV=development node server.js",
    "serve": "NODE_ENV=production node server.js",
    "watch-styleguide": "chokidar 'site/**/*.*' -c 'yarn build-styleguide'",
    "build-styleguide": "NODE_ENV=production STYLE_ROOT=public/resources node node_modules/mk-living-style",
    "generate-route-docs": "node scripts/generate-route-docs.js",
    "_comment": "The following scripts are for the font copying and CSS generation",
    "copy-fonts": "node lib/deploy/copy-fonts.js",
    "postinstall": "npm run copy-fonts"
  "prettier": {
    "singleQuote": true,
    "printWidth": 80,
    "overrides": [
        "files": [
        "options": {
          "singleQuote": false
  "devDependencies": {
    "mk-living-style": "https://github.com/mkastner/mk-living-style.git",
    "supertest": "^7.0.0"
  "dependencies": {
    "@fontsource-variable/inter": "^5.0.18",
    "@fontsource/inter": "^5.0.18",
    "@fontsource/noto-sans-linear-a": "^5.0.20",
    "@prismicio/client": "^7.5.0",
    "@prismicio/helpers": "^2.3.9",
    "chokidar": "^3.6.0",
    "cookie-parser": "^1.4.6",
    "express": "^4.19.2",
    "express-handlebars": "^7.1.2",
    "quick-lru": "^7.0.0",
    "tracer": "^1.3.0",
    "ws": "^8.17.0"

Steps to reproduce

Install express.js, create preview route and a document route.

The preview settings are the same for all projects and aren't specific to Express.js. To debug your issue, check the reference (ref) of the preview query. The ref is what references the content you're pointing at.