deploying-ui-bundle

Deploy Salesforce UI bundles with synchronized GraphQL schema and codegen.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/sf-skills --skill deploying-ui-bundle-forcedotcom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deploying-ui-bundle
Source: https://github.com/forcedotcom/sf-skills/tree/main/skills/deploying-ui-bundle
Command: npx skills add https://github.com/forcedotcom/sf-skills --skill deploying-ui-bundle-forcedotcom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deploying a Salesforce Lightning UI bundle reliably requires the right sequencing across authentication, build, deployment, permissions, optional data loading, and GraphQL schema/codegen updates.

Core Features & Use Cases

  • Step-ordered org authentication and UI bundle build: Ensures dist/ is present before any UI bundle metadata deployment.
  • Correct metadata deployment strategy: Deploys via manifest/package.xml or package.xml when present, otherwise deploys project metadata broadly.
  • Post-deploy permission assignment and optional data import: Assigns discovered permission sets before schema fetch and optionally imports data from data/data-plan.json with user confirmation.
  • GraphQL schema fetch and code generation alignment: Fetches schema after deployment and permissions changes, writing schema.graphql, then runs codegen from the locally updated schema.

Real-world use case: you push a UI bundle app with custom objects/fields and want the resulting GraphQL schema and generated types to match the deployed org state without manual, error-prone reordering.

Quick Start

Use this skill to deploy your UI bundle app to your connected Salesforce org, including post-deploy permission assignment and GraphQL schema/codegen regeneration.

Frequently Asked Questions about deploying-ui-bundle

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a Salesforce UI bundle and sync GraphQL schema correctly?

Deploying a Salesforce UI bundle requires building the `dist/` directory first, deploying metadata via `manifest/package.xml`, assigning permission sets, and then fetching GraphQL schema to run codegen for type alignment.

What is the correct order for deploying UI bundle metadata and fetching GraphQL schema?

The correct order for UI bundle deployment is authenticating the org, building the `dist/` output, deploying metadata, assigning permission sets, and fetching the GraphQL schema last to ensure generated code matches deployed org state.

Do I need to assign permission sets before fetching a GraphQL schema in Salesforce?

Yes, assigning permission sets before fetching the GraphQL schema is required. This ensures the generated code and schema accurately reflect the deployed metadata and the user's actual object access within the Salesforce org.

Can I import data from data-plan.json during a Salesforce UI bundle deployment?

Yes, you can optionally import data from `data/data-plan.json` during the deployment workflow. The process requires explicit user confirmation before executing the data import alongside metadata deployment and permission set assignment.

How do I deploy a UI bundle when there is no manifest package.xml?

When `manifest/package.xml` or `package.xml` is absent, the deployment strategy defaults to deploying the full project metadata broadly to the authenticated Salesforce org instead of targeting specific components.

Why does my generated GraphQL code not match my deployed Salesforce org state?

Generated GraphQL code mismatches occur when schema fetch and codegen run before deployment or permission set assignment. Fetching the schema after deploying metadata ensures the generated types match the org state.