@salesforce/webapp-template-base-react-app-experimental 1.112.5 → 1.112.7

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,16 @@
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.112.7](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.6...v1.112.7) (2026-03-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - sample app b2e updates @W-21451626 ([#331](https://github.com/salesforce-experience-platform-emu/webapps/issues/331)) ([aa91283](https://github.com/salesforce-experience-platform-emu/webapps/commit/aa91283851684a491ce88195e70f327cc0c56d84))
11
+
12
+ ## [1.112.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.5...v1.112.6) (2026-03-23)
13
+
14
+ **Note:** Version bump only for package @salesforce/webapp-template-base-react-app-experimental
15
+
6
16
  ## [1.112.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.4...v1.112.5) (2026-03-21)
7
17
 
8
18
  ### 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.112.5",
3
+ "version": "1.112.7",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -15,8 +15,8 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/sdk-data": "^1.112.5",
19
- "@salesforce/webapp-experimental": "^1.112.5",
18
+ "@salesforce/sdk-data": "^1.112.7",
19
+ "@salesforce/webapp-experimental": "^1.112.7",
20
20
  "@tailwindcss/vite": "^4.1.17",
21
21
  "class-variance-authority": "^0.7.1",
22
22
  "clsx": "^2.1.1",
@@ -41,7 +41,7 @@
41
41
  "@graphql-eslint/eslint-plugin": "^4.1.0",
42
42
  "@graphql-tools/utils": "^11.0.0",
43
43
  "@playwright/test": "^1.49.0",
44
- "@salesforce/vite-plugin-webapp-experimental": "^1.112.5",
44
+ "@salesforce/vite-plugin-webapp-experimental": "^1.112.7",
45
45
  "@testing-library/jest-dom": "^6.6.3",
46
46
  "@testing-library/react": "^16.1.0",
47
47
  "@testing-library/user-event": "^14.5.2",
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Thin GraphQL client: createDataSDK + data.graphql with centralized error handling.
3
+ * Use with gql-tagged queries and generated operation types for type-safe calls.
4
+ */
5
+ import { createDataSDK } from '@salesforce/sdk-data';
6
+
7
+ export async function executeGraphQL<TData, TVariables>(
8
+ query: string,
9
+ variables?: TVariables
10
+ ): Promise<TData> {
11
+ const data = await createDataSDK();
12
+ // SDK types graphql() first param as string; at runtime it may accept gql DocumentNode too
13
+ const response = await data.graphql?.<TData, TVariables>(query, variables);
14
+
15
+ if (!response) {
16
+ throw new Error('GraphQL response is undefined');
17
+ }
18
+
19
+ if (response?.errors?.length) {
20
+ const msg = response.errors.map(e => e.message).join('; ');
21
+ throw new Error(`GraphQL Error: ${msg}`);
22
+ }
23
+
24
+ return response.data;
25
+ }