{
  "slug": "filter-linear-graphql-response-mobile",
  "title": "Linear graphql response filter fields for mobile",
  "metaTitle": "Linear graphql response filter - RealComposer",
  "metaDescription": "Linear graphql response filter fields for mobile. Pick issue id title state assignee from GraphQL respons. Map only UI fields from Linear before React.",
  "headline": "Issue lists without nested team cycles",
  "category": "slimmer",
  "categoryLabel": "Payload Slimmer",
  "urgency": 8,
  "clientPlatform": "React Native",
  "upstreamServices": [
    "Linear"
  ],
  "searchIntentQuery": "linear graphql response filter fields for mobile",
  "directAnswerSummary": "Pick issue id title state assignee from GraphQL response. For \"linear graphql response filter fields for mobile\", 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/filter-linear-graphql-response-mobile 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": "Store upstream credentials in Secret Vault",
      "description": "Create LINEAR_API_KEY vault entries, then bind them to this pipeline step headers with {{secrets.NAME}} placeholders."
    },
    {
      "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/filter-linear-graphql-response-mobile', {\n  headers: { Authorization: 'Bearer rc_live_your_token' }\n});"
    }
  ],
  "pipelineConfig": {
    "name": "Linear graphql response filter fields for mobile",
    "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_filter-l",
    "upstreamLatencyMs": 142,
    "audit": {
      "region": "edge",
      "trace": "filter-linear-graphql-response-mobile"
    },
    "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/filter-linear-graphql-response-mobile\" \\\n  -H \"Authorization: Bearer rc_live_client_token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\":\"example\"}'",
  "faqs": [
    {
      "question": "Which Linear credential belongs in the vault for this pipeline?",
      "answer": "Log request IDs for filter-linear-graphql-response-mobile, not raw Linear payloads, because upstream bodies may include PII."
    },
    {
      "question": "What cache key does RealComposer use?",
      "answer": "filter-linear-graphql-response-mobile vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body."
    },
    {
      "question": "Can I restrict which domains call this pipeline?",
      "answer": "Upstream steps in filter-linear-graphql-response-mobile honor timeoutMs and optional fallback JSON without leaking secrets."
    }
  ],
  "relatedRecipeSlugs": [
    "slim-github-api-response-mobile-widgets",
    "reduce-json-size-flutter-app"
  ],
  "updatedAt": "2026-11-20",
  "links": {
    "page": "https://realcomposer.com/recipes/filter-linear-graphql-response-mobile",
    "markdown": "https://realcomposer.com/recipes/filter-linear-graphql-response-mobile.md",
    "json": "https://realcomposer.com/recipes/filter-linear-graphql-response-mobile.json",
    "install": "https://realcomposer.com/dashboard/pipelines/new?recipe=filter-linear-graphql-response-mobile&via=agent"
  }
}