---
schema_version: "1"
id: a8877179d8bc0c7d198840457746e94675c59b9c13d5f759602143191d40d358
title: Get Record Data in Your React Apps with Data SDK and GraphQL (Generally Available)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/262-0-0/rn_react_data_sdk.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_react_data_sdk.htm&release=262.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c50a05b0e4c357b8dae518a755534d23d576496a93f849a005122466823dc911
description: 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.
products:
  - Cross Cloud
release: "262"
---
# Get Record Data in Your React Apps with Data SDK and GraphQL (Generally Available)

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](https://help.salesforce.com/s/articleView?id=release-notes.rn_react_build.htm&release=262.0.0&type=5 "Build React apps on the Headless 360 platform using Salesforce Multi-Framework. Whether you prefer to code by hand or speed up development with Agentforce Vibes, now you can create, test, and deploy React apps for both consumers and enterprises. This feature, now generally available, includes some changes since the last release.").

Previously, we made several changes in the beta release on June 3, 2026.

- **Data SDK import**: Import `createDataSDK` and `gql` from `@salesforce/platform-sdk/data` instead 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 using `dataSdk.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 custom `max-age` configurations.

```
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?: "..."
  });
```

#### See Also

- [_Salesforce Multi-Framework Developer Guide_: Access Record Data with Data SDK (Beta)](https://developer.salesforce.com/docs/platform/multiframework/guide/reactdev-data-sdk-usage.html)