@salesforce/ui-bundle-template-base-react-app 7.1.0 → 8.0.1
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,20 @@
|
|
|
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
|
+
## [8.0.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v8.0.0...v8.0.1) (2026-05-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-react-app
|
|
9
|
+
|
|
10
|
+
## [8.0.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v7.1.0...v8.0.0) (2026-05-15)
|
|
11
|
+
|
|
12
|
+
### ⚠ BREAKING CHANGES
|
|
13
|
+
|
|
14
|
+
- **platform-sdk-data:** graphql namespace with query/mutate and default caching (#502)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- **platform-sdk-data:** graphql namespace with query/mutate and default caching ([#502](https://github.com/salesforce-experience-platform-emu/webapps/issues/502)) ([576c1dc](https://github.com/salesforce-experience-platform-emu/webapps/commit/576c1dc49bc6c815bab296a94d4f8cd097424440))
|
|
19
|
+
|
|
6
20
|
## [7.1.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v7.0.1...v7.1.0) (2026-05-14)
|
|
7
21
|
|
|
8
22
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-react-app
|
package/package.json
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@salesforce/platform-sdk": "^
|
|
22
|
-
"@salesforce/ui-bundle": "^
|
|
21
|
+
"@salesforce/platform-sdk": "^8.0.1",
|
|
22
|
+
"@salesforce/ui-bundle": "^8.0.1",
|
|
23
23
|
"@tailwindcss/vite": "^4.1.17",
|
|
24
24
|
"class-variance-authority": "^0.7.1",
|
|
25
25
|
"clsx": "^2.1.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
45
45
|
"@graphql-tools/utils": "^11.0.0",
|
|
46
46
|
"@playwright/test": "^1.49.0",
|
|
47
|
-
"@salesforce/vite-plugin-ui-bundle": "^
|
|
47
|
+
"@salesforce/vite-plugin-ui-bundle": "^8.0.1",
|
|
48
48
|
"@testing-library/jest-dom": "^6.6.3",
|
|
49
49
|
"@testing-library/react": "^16.1.0",
|
|
50
50
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Thin GraphQL client: createDataSDK +
|
|
3
|
-
* Use with gql-tagged queries and generated operation types
|
|
2
|
+
* Thin GraphQL client: createDataSDK + sdk.graphql.query with centralized
|
|
3
|
+
* error handling. Use with gql-tagged queries and generated operation types
|
|
4
|
+
* for type-safe calls.
|
|
4
5
|
*/
|
|
5
6
|
import { createDataSDK } from '@salesforce/platform-sdk';
|
|
6
7
|
|
|
@@ -9,20 +10,19 @@ export async function executeGraphQL<TData, TVariables>(
|
|
|
9
10
|
variables?: TVariables
|
|
10
11
|
): Promise<TData> {
|
|
11
12
|
const data = await createDataSDK();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
variables,
|
|
13
|
+
const result = await data.graphql!.query<TData, TVariables>({
|
|
14
|
+
query: query,
|
|
15
|
+
variables: variables,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
if (
|
|
19
|
-
|
|
18
|
+
if (result.errors?.length) {
|
|
19
|
+
const msg = result.errors.map(e => e.message).join('; ');
|
|
20
|
+
throw new Error(`GraphQL Error: ${msg}`);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
throw new Error(`GraphQL Error: ${msg}`);
|
|
23
|
+
if (result.data == null) {
|
|
24
|
+
throw new Error('GraphQL response data is null');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return result.data;
|
|
28
28
|
}
|