{
  "id": "api/graphql-http-413-payload-too-large-query",
  "signature": "GraphQL HTTP 413: Query payload too large",
  "signature_zh": "GraphQL HTTP 413：查询负载过大",
  "regex": "GraphQL HTTP 413: Query payload too large",
  "domain": "api",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "GraphQL query or mutation body exceeds the HTTP request body size limit configured on the server (e.g., 1 MB default in Express/NGINX).",
  "root_cause_type": "generic",
  "root_cause_zh": "GraphQL 查询或变更主体超过了服务器配置的 HTTP 请求体大小限制（例如 Express/NGINX 中的默认 1 MB）。",
  "versions": [
    {
      "version": "Apollo Server 4.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Express 4.18+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "NGINX 1.24+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GraphQL Yoga 3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS API Gateway 2023+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "The body size limit is checked before query parsing.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "GET requests have their own size limits (e.g., 8 KB for most servers) and are not suitable for large queries.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Increase the body size limit in Express middleware:\nconst express = require('express');\nconst app = express();\napp.use(express.json({ limit: '10mb' })); // Increase to 10 MB\nIf using Apollo Server with Express, apply this before the Apollo middleware.",
      "success_rate": 0.9,
      "how": "Increase the body size limit in Express middleware:\nconst express = require('express');\nconst app = express();\napp.use(express.json({ limit: '10mb' })); // Increase to 10 MB\nIf using Apollo Server with Express, apply this before the Apollo middleware.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If using NGINX as a reverse proxy, increase client_max_body_size in the server block:\nserver {\n    client_max_body_size 10m;\n    ...\n}",
      "success_rate": 0.85,
      "how": "If using NGINX as a reverse proxy, increase client_max_body_size in the server block:\nserver {\n    client_max_body_size 10m;\n    ...\n}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Increase the body size limit in Express middleware:\nconst express = require('express');\nconst app = express();\napp.use(express.json({ limit: '10mb' })); // Increase to 10 MB\nIf using Apollo Server with Express, apply this before the Apollo middleware.",
    "If using NGINX as a reverse proxy, increase client_max_body_size in the server block:\nserver {\n    client_max_body_size 10m;\n    ...\n}"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.apollographql.com/docs/apollo-server/performance/limits/#request-body-size",
  "official_doc_section": null,
  "error_code": "413",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}