graphql-data-access

Automate Salesforce GraphQL data access with codegen tooling and the UI API.

803|289|Updated Nov 7, 2025
One-click install
npx skills add https://github.com/forcedotcom/afv-library --skill graphql-data-access
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql-data-access
Source: https://github.com/forcedotcom/afv-library/tree/main/samples/webapp-template-app-react-sample-b2x-experimental/.a4drules/skills/feature-graphql-graphql-data-access
Command: npx skills add https://github.com/forcedotcom/afv-library --skill graphql-data-access

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to adding or modifying Salesforce GraphQL data access code, enabling developers to integrate GraphQL operations with the Salesforce UI API efficiently.

Core Features & Use Cases

  • Guided setup: scaffolds usage of getDataSDK() and data.graphql?.() with codegen tooling to generate types.
  • Query and mutation support: supports fetching, querying, and mutating Salesforce data via GraphQL, including new operation creation for objects like Account, Contact, or Opportunity.
  • Use Case: Imagine building a React app that needs to read and update Salesforce data through GraphQL; this skill provides the ready-to-follow workflow and tooling configuration to implement that flow.

Quick Start

Use this skill to set up Salesforce GraphQL data access in your project by following the prerequisites and workflow steps.

Frequently Asked Questions about graphql-data-access

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

FAQPage Schema
How do I add Salesforce GraphQL data access to my project?

To add Salesforce GraphQL data access, you need to scaffold `getDataSDK()` and `data.graphql?.()` alongside codegen tooling to generate types and execute operations.

Can I perform mutations on Salesforce objects like Account using the UI API?

Yes, you can mutate Salesforce object data like Account or Contact via GraphQL. The skill supports type-safe fetch, query, and mutate operations integrated with the Salesforce UI API.

What dependencies do I need to generate types for Salesforce GraphQL queries?

You need `getDataSDK`, the uiapi schema, and codegen tooling. These components work together to generate the required types and execute your Salesforce GraphQL queries and mutations.

What is the best way to ensure type-safe Salesforce GraphQL fetch operations?

Using codegen tooling with the Salesforce UI API schema ensures type-safe fetch operations. This skill automates that integration setup to safely query and mutate Salesforce object data.

Does this Salesforce GraphQL integration approach work for React applications?

Yes, this approach fits React applications needing to read and update Salesforce data. It provides a structured workflow and tooling configuration to implement GraphQL data access flows efficiently.