Data SDK provides a type-safe and consistent way to access data in React web apps. It handles complex implementation details like authentication and CSRF validation, while your code focuses on the GraphQL queries and mutations to access and update record data.
Where: This change applies to Lightning Experience in Enterprise, Unlimited, and Developer editions.
When: This feature is generally available starting July 9, 2026.
Why: Use Data SDK to work with record data in Salesforce Multi-Framework.
Previously, we made several changes in the beta release on June 3, 2026.
- Data SDK import: Import
createDataSDKandgqlfrom@salesforce/platform-sdk/datainstead of@salesforce/sdk-data. - GraphQL query method: Get record data by using
dataSdk.graphql?.query<ResponseType, VariablesType>({query, variables, operationName?, cacheControl?}). Previously, you got record data by usingdataSdk.graphql?.<ResponseType, VariablesType>(query, variables); - GraphQL mutate method: Create, update, or delete Salesforce records directly from
your React app by using
dataSdk.graphql?.mutate<ResponseType, VariablesType>({mutation, variables, operationName?}). - Cache policy configuration: Override the default 5-minute time-to-live (TTL)
caching behavior with
no-cache,only-if-cached, or custommax-ageconfigurations.
import { createDataSDK } from "@salesforce/platform-sdk/data";
const dataSdk = await createDataSDK();
const queryResult = await dataSdk.graphql?.query<ResponseType, VariablesType>({
query: QUERY_STRING,
variables: { ... },
operationName?: "...",
cacheControl?: "no-cache" | "only-if-cached" | { type: "max-age", maxAge: 60 }
});
const mutationResult = await dataSdk.graphql?.mutate<ResponseType, VariablesType>({
mutation: MUTATION_STRING,
variables: { ... },
operationName?: "..."
});