@salesforce/webapp-template-base-react-app-experimental 1.53.2 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.54.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.2...v1.54.0) (2026-02-25)
7
+
8
+ ### Features
9
+
10
+ - replace executeGraphQL with getDataSDK + data.graphql?.() ([#165](https://github.com/salesforce-experience-platform-emu/webapps/issues/165)) ([b94cb92](https://github.com/salesforce-experience-platform-emu/webapps/commit/b94cb92d62340e13b19eb8835913ec4f740097dc))
11
+
6
12
  ## [1.53.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.1...v1.53.2) (2026-02-25)
7
13
 
8
14
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-react-app-experimental",
3
- "version": "1.53.2",
3
+ "version": "1.54.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,5 +15,5 @@
15
15
  "test:coverage": "npm run test",
16
16
  "test:e2e": "cd src/force-app/main/default/webapplications/base-react-app && rm -rf node_modules && npm ci && npx playwright install chromium && npm run build:e2e && npx playwright test"
17
17
  },
18
- "gitHead": "8866eb09bf1e24f023333d1ecc491a1e1a6c8904"
18
+ "gitHead": "b48827161c23db20c7e546a857fe8c9f5f560c20"
19
19
  }
@@ -1,4 +1,4 @@
1
- import { executeGraphQL } from '@salesforce/webapp-experimental/api';
1
+ import { getDataSDK } from '@salesforce/webapp-experimental/api';
2
2
  import HIGH_REVENUE_ACCOUNTS_QUERY from './query/highRevenueAccountsQuery.graphql?raw';
3
3
  import type {
4
4
  GetHighRevenueAccountsQuery,
@@ -24,10 +24,18 @@ type AccountNode = NonNullable<
24
24
  export async function getHighRevenueAccounts(
25
25
  variables: GetHighRevenueAccountsQueryVariables
26
26
  ): Promise<(AccountNode | null | undefined)[]> {
27
- const response = await executeGraphQL<GetHighRevenueAccountsQuery>(
28
- HIGH_REVENUE_ACCOUNTS_QUERY,
29
- variables
30
- );
27
+ const data = await getDataSDK();
28
+ const response = await data.graphql?.<
29
+ GetHighRevenueAccountsQuery,
30
+ GetHighRevenueAccountsQueryVariables
31
+ >(HIGH_REVENUE_ACCOUNTS_QUERY, variables);
32
+
33
+ if (response?.errors?.length) {
34
+ const errorMessages = response.errors.map(e => e.message).join('; ');
35
+ throw new Error(`GraphQL Error: ${errorMessages}`);
36
+ }
31
37
 
32
- return response.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || [];
38
+ return (
39
+ response?.data?.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || []
40
+ );
33
41
  }