{
  "slug": "optimize-linear-issue-response-react-native",
  "title": "Linear issue api optimize response react native",
  "metaTitle": "Linear issue api optimize response - RealComposer",
  "metaDescription": "Linear issue api optimize response react native. Trim GraphQL issue payloads before JSON.parse on device. Map only UI fields from Linear before React.",
  "headline": "Board views under Hermes memory limits",
  "category": "slimmer",
  "categoryLabel": "Payload Slimmer",
  "urgency": 8,
  "clientPlatform": "React Native",
  "upstreamServices": [
    "Linear"
  ],
  "searchIntentQuery": "linear issue api optimize response react native",
  "directAnswerSummary": "Trim GraphQL issue payloads before JSON.parse on device. For \"linear issue api optimize response react native\", store LINEAR_API_KEY in Secret Vault, call https://api.linear.app/graphql from a Worker, and let React Native hit only https://realcomposer.com/v1/workspace/optimize-linear-issue-response-react-native with an rc_live_ client token. POST upstream calls are not stored in caches.default; clients must send JSON bodies and headers forward unchanged.",
  "problem": {
    "title": "Linear JSON bloat on React Native",
    "explanation": "Oversized Linear payloads inflate parse time and mobile data charges for React Native users.",
    "risks": [
      "Main-thread JSON parse stalls on low-end phones",
      "Accidentally exposing PII fields to the client",
      "Downstream components re-render on unused keys"
    ]
  },
  "solutionSteps": [
    {
      "stepNumber": 1,
      "title": "Add vault secrets for this pipeline",
      "description": "Store LINEAR_API_KEY in the vault. React Native never embeds the raw secret, only a revocable rc_live_ client token."
    },
    {
      "stepNumber": 2,
      "title": "Target the real upstream URL",
      "description": "Configure headersTemplate to inject vault secrets, target https://api.linear.app/graphql, and Map only the UI fields in output mapping so clients never download audit or nested blobs."
    },
    {
      "stepNumber": 3,
      "title": "Call from React Native",
      "description": "Allowed origins on the token should list every React Native host that calls this URL.",
      "codeSnippet": "const res = await fetch('https://realcomposer.com/v1/workspace/optimize-linear-issue-response-react-native', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Linear issue api optimize response react native",
    "method": "POST",
    "cacheTtlSeconds": 0,
    "authMode": "client_token",
    "steps": [
      {
        "stepKey": "linear",
        "upstreamUrlTemplate": "https://api.linear.app/graphql",
        "httpMethod": "POST",
        "headersTemplate": {
          "Authorization": "{{secrets.LINEAR_API_KEY}}",
          "Content-Type": "application/json"
        },
        "timeoutMs": 10000
      }
    ],
    "outputMapping": {
      "version": 1,
      "fields": [
        {
          "targetPath": "issueId",
          "sourcePath": "data.issue.id",
          "type": "string",
          "sourceStep": "linear"
        },
        {
          "targetPath": "title",
          "sourcePath": "data.issue.title",
          "type": "string",
          "sourceStep": "linear"
        }
      ]
    }
  },
  "sampleBloatedInput": {
    "requestId": "req_optimize",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "optimize-linear-issue-response-react-native"
    },
    "payload": {
      "id": "sample_id",
      "status": "active",
      "nested": {
        "tags": [
          "demo"
        ],
        "internal": true
      },
      "unused_blob": {
        "foo": "bar",
        "bar": "baz"
      }
    }
  },
  "sampleSlimmedOutput": {
    "issueId": "sample",
    "title": "sample"
  },
  "curlSnippet": "curl -X POST \"https://realcomposer.com/v1/workspace/optimize-linear-issue-response-react-native\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Is it safe to log Linear responses in React Native?",
      "answer": "Store LINEAR_API_KEY for optimize-linear-issue-response-react-native. React Native never sees decrypted values."
    },
    {
      "question": "When does edge caching apply to this recipe?",
      "answer": "optimize-linear-issue-response-react-native vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "What happens if an upstream step times out?",
      "answer": "Rotate vault secrets for optimize-linear-issue-response-react-native anytime; clients keep the same rc_live_ token."
    }
  ],
  "relatedRecipeSlugs": [
    "optimize-api-response-size-react-native",
    "filter-linear-graphql-response-mobile"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/optimize-linear-issue-response-react-native",
    "markdown": "https://realcomposer.com/recipes/optimize-linear-issue-response-react-native.md",
    "json": "https://realcomposer.com/recipes/optimize-linear-issue-response-react-native.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=optimize-linear-issue-response-react-native&via=agent"
  }
}