What problem does it solve?
This Skill prevents broken or insecure Salesforce record operations in UI bundles by enforcing a single, schema-verified Data SDK approach for both reads and writes.
Core Features & Use Cases
- Data SDK enforcement: Requires all Salesforce data access to go through
@salesforce/sdk-data, handling authentication, CSRF, and base URL resolution.
- GraphQL-first record operations: Defines when to use
sdk.graphql (preferred for record queries/mutations) versus sdk.fetch (for specific REST-like gaps such as UI API metadata, Apex REST, Connect upload config, or Einstein LLM).
- Schema-verified query generation workflow: Mandates
schema.graphql presence, entity/field discovery via scripts/graphql-search.sh, and prohibits guessing names or types.
- GraphQL safety rules: Requires
errors parsing, @optional on record fields, explicit pagination (first + pageInfo), correct mutation wrapping (uiapi(input: { allOrNone: ... })), and strict allowlisting of supported APIs.
- UI bundle integration guidance: Supports
.graphql files with codegen and inline gql for simpler queries, with resilient consuming code patterns (optional chaining and nullish coalescing).
Quick Start
Use this skill to guide your UI bundle so that you only write GraphQL operations after verifying entities and fields with graphql-search, then generate types with graphql:codegen and call the operations through the Data SDK with optional chaining.