From 7d19f2625fad30e8c07ff490e28388adcd0fde28 Mon Sep 17 00:00:00 2001 From: Jose David Rodriguez Velasco Date: Mon, 13 Apr 2026 17:51:57 -0400 Subject: [PATCH] fix: make it explicit not to read schema in the non-negotiable rules --- skills/using-ui-bundle-salesforce-data/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/using-ui-bundle-salesforce-data/SKILL.md b/skills/using-ui-bundle-salesforce-data/SKILL.md index 3779618..da90875 100644 --- a/skills/using-ui-bundle-salesforce-data/SKILL.md +++ b/skills/using-ui-bundle-salesforce-data/SKILL.md @@ -74,7 +74,7 @@ These rules exist because Salesforce GraphQL has platform-specific behaviors tha 1. **HTTP 200 does not mean success** — Salesforce returns HTTP 200 even when operations fail. **Always parse the `errors` array in the response body.** -2. **Schema is the single source of truth** — Every entity name, field name, and type must be confirmed via the schema search script before use in a query. Never guess — Salesforce field names are case-sensitive, relationships may be polymorphic, and custom objects use suffixes (`__c`, `__e`). Objects added to UI API in v60+ may use a `_Record` suffix (e.g., `FeedItem_Record` instead of `FeedItem`). +2. **Schema is the single source of truth — access it only via the search script** — Every entity name, field name, and type must be confirmed by running `bash scripts/graphql-search.sh ` before use in a query. Never read `schema.graphql` directly. Never guess — Salesforce field names are case-sensitive, relationships may be polymorphic, and custom objects use suffixes (`__c`, `__e`). Objects added to UI API in v60+ may use a `_Record` suffix (e.g., `FeedItem_Record` instead of `FeedItem`). 3. **`@optional` on all record fields** (read queries) — Salesforce field-level security (FLS) causes queries to fail entirely if the user lacks access to even one field. The `@optional` directive (v65+) tells the server to omit inaccessible fields instead of failing. Apply it to every scalar field, parent relationship, and child relationship. Consuming code must use optional chaining (`?.`) and nullish coalescing (`??`). @@ -102,7 +102,7 @@ These rules exist because Salesforce GraphQL has platform-specific behaviors tha ### Step 1: Acquire Schema -The `schema.graphql` file (265K+ lines) is the source of truth. **Never open or parse it directly** — no cat, less, head, tail, editors, or programmatic parsers. +The `schema.graphql` file (265K+ lines) is the source of truth. **Never open or parse it directly** — do NOT use `Read`, `Grep`, `Bash`, `cat`, `head`, `tail`, `grep`, `rg`, `less`, `sed`, `awk`, editors, or any tool to read, search, or parse this file. It will overwhelm your context. Use only `bash scripts/graphql-search.sh `. Verify preconditions 1–3 (see [Preconditions](#preconditions--verify-before-starting)), then proceed to Step 2.