From 947be448288e4a71f82db99e07e7d753c057ab1f Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Tue, 13 Oct 2020 14:34:44 +0200 Subject: [PATCH 1/3] CIF-1654 - Add graphqlMethod to ConfigContext --- .circleci/ci/it-tests.js | 2 +- .gitignore | 1 + pom.xml | 4 ++-- ui.frontend/src/main/components/App/App.js | 5 +++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/ci/it-tests.js b/.circleci/ci/it-tests.js index b70634cb..ac13288d 100644 --- a/.circleci/ci/it-tests.js +++ b/.circleci/ci/it-tests.js @@ -28,7 +28,7 @@ try { ci.sh('./qp.sh -v bind --server-hostname localhost --server-port 55555'); // We install the graphql-client by default except with the CIF Add-On - let extras = '--bundle com.adobe.commerce.cif:graphql-client:1.6.1:jar'; + let extras = '--bundle com.adobe.commerce.cif:graphql-client:1.7.0:jar'; if (classifier == 'classic') { // The core components are already installed in the Cloud SDK extras += ' --bundle com.adobe.cq:core.wcm.components.all:2.9.0:zip'; diff --git a/.gitignore b/.gitignore index db849be3..ff986666 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ tmp/ local.properties .settings/ .loadpath +.DS_Store # Eclipse Core .project diff --git a/pom.xml b/pom.xml index 68ad2f5e..5de2b141 100644 --- a/pom.xml +++ b/pom.xml @@ -49,8 +49,8 @@ admin admin 2.10.0 - 1.4.0 - 1.6.1 + 1.4.1-SNAPSHOT + 1.7.0 6.0.0-magento235 5.0.0 UTF-8 diff --git a/ui.frontend/src/main/components/App/App.js b/ui.frontend/src/main/components/App/App.js index d190548f..24ce6fb3 100644 --- a/ui.frontend/src/main/components/App/App.js +++ b/ui.frontend/src/main/components/App/App.js @@ -35,12 +35,13 @@ import partialConfig from './config'; import '../../site/main.scss'; const App = () => { - const { storeView, graphqlEndpoint } = document.querySelector('body').dataset; + const { storeView, graphqlEndpoint, graphqlMethod } = document.querySelector('body').dataset; const { mountingPoints, pagePaths } = partialConfig; const config = { ...partialConfig, storeView, - graphqlEndpoint + graphqlEndpoint, + graphqlMethod }; return ( From c6a10ea778f0f540529f8156a371632df369f135 Mon Sep 17 00:00:00 2001 From: Laurentiu Magureanu Date: Fri, 16 Oct 2020 16:42:17 +0300 Subject: [PATCH 2/3] CIF-1633: Remove unused dependency --- ui.frontend/package-lock.json | 85 +---------------------------------- ui.frontend/package.json | 1 - 2 files changed, 2 insertions(+), 84 deletions(-) diff --git a/ui.frontend/package-lock.json b/ui.frontend/package-lock.json index dba10c5a..dfcadffc 100644 --- a/ui.frontend/package-lock.json +++ b/ui.frontend/package-lock.json @@ -9,60 +9,6 @@ "resolved": "https://registry.npmjs.org/@adobe/aem-core-cif-react-components/-/aem-core-cif-react-components-1.4.0.tgz", "integrity": "sha512-ZYUZjlvGSsgmVD0xbk2dhVd9Fxh33joOv/0TzE5MHOJKiayaBhJmilS3zi0b0ki0pdkmm8VhqSzGKdqllG3s6Q==" }, - "@apollo/react-common": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@apollo/react-common/-/react-common-3.1.4.tgz", - "integrity": "sha512-X5Kyro73bthWSCBJUC5XYQqMnG0dLWuDZmVkzog9dynovhfiVCV4kPSdgSIkqnb++cwCzOVuQ4rDKVwo2XRzQA==", - "requires": { - "ts-invariant": "^0.4.4", - "tslib": "^1.10.0" - } - }, - "@apollo/react-components": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@apollo/react-components/-/react-components-3.1.5.tgz", - "integrity": "sha512-c82VyUuE9VBnJB7bnX+3dmwpIPMhyjMwyoSLyQWPHxz8jK4ak30XszJtqFf4eC4hwvvLYa+Ou6X73Q8V8e2/jg==", - "requires": { - "@apollo/react-common": "^3.1.4", - "@apollo/react-hooks": "^3.1.5", - "prop-types": "^15.7.2", - "ts-invariant": "^0.4.4", - "tslib": "^1.10.0" - } - }, - "@apollo/react-hoc": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@apollo/react-hoc/-/react-hoc-3.1.5.tgz", - "integrity": "sha512-jlZ2pvEnRevLa54H563BU0/xrYSgWQ72GksarxUzCHQW85nmn9wQln0kLBX7Ua7SBt9WgiuYQXQVechaaCulfQ==", - "requires": { - "@apollo/react-common": "^3.1.4", - "@apollo/react-components": "^3.1.5", - "hoist-non-react-statics": "^3.3.0", - "ts-invariant": "^0.4.4", - "tslib": "^1.10.0" - } - }, - "@apollo/react-hooks": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@apollo/react-hooks/-/react-hooks-3.1.5.tgz", - "integrity": "sha512-y0CJ393DLxIIkksRup4nt+vSjxalbZBXnnXxYbviq/woj+zKa431zy0yT4LqyRKpFy9ahMIwxBnBwfwIoupqLQ==", - "requires": { - "@apollo/react-common": "^3.1.4", - "@wry/equality": "^0.1.9", - "ts-invariant": "^0.4.4", - "tslib": "^1.10.0" - } - }, - "@apollo/react-ssr": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/@apollo/react-ssr/-/react-ssr-3.1.5.tgz", - "integrity": "sha512-wuLPkKlctNn3u8EU8rlECyktpOUCeekFfb0KhIKknpGY6Lza2Qu0bThx7D9MIbVEzhKadNNrzLcpk0Y8/5UuWg==", - "requires": { - "@apollo/react-common": "^3.1.4", - "@apollo/react-hooks": "^3.1.5", - "tslib": "^1.10.0" - } - }, "@babel/code-frame": { "version": "7.10.3", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", @@ -3762,14 +3708,6 @@ "@xtuc/long": "4.2.2" } }, - "@wry/equality": { - "version": "0.1.11", - "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.1.11.tgz", - "integrity": "sha512-mwEVBDUVODlsQQ5dfuLUS5/Tf7jqUKyhKYHmVi4fPB6bDMOfWvUPJmKgS1Z7Za/sOI3vzWt4+O7yCiL/70MogA==", - "requires": { - "tslib": "^1.9.3" - } - }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -10424,18 +10362,6 @@ "prop-types": "^15.6.2" } }, - "react-apollo": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/react-apollo/-/react-apollo-3.1.5.tgz", - "integrity": "sha512-xOxMqxORps+WHrUYbjVHPliviomefOpu5Sh35oO3osuOyPTxvrljdfTLGCggMhcXBsDljtS5Oy4g+ijWg3D4JQ==", - "requires": { - "@apollo/react-common": "^3.1.4", - "@apollo/react-components": "^3.1.5", - "@apollo/react-hoc": "^3.1.5", - "@apollo/react-hooks": "^3.1.5", - "@apollo/react-ssr": "^3.1.5" - } - }, "react-dom": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz", @@ -12199,14 +12125,6 @@ "glob": "^7.1.2" } }, - "ts-invariant": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.4.4.tgz", - "integrity": "sha512-uEtWkFM/sdZvRNNDL3Ehu4WVpwaulhwQszV8mrtcdeE8nN00BV9mAmQ88RkrBhFgl9gMgvjJLAQcZbnPXI9mlA==", - "requires": { - "tslib": "^1.9.3" - } - }, "ts-loader": { "version": "5.4.5", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.4.5.tgz", @@ -12263,7 +12181,8 @@ "tslib": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true }, "tsutils": { "version": "3.17.1", diff --git a/ui.frontend/package.json b/ui.frontend/package.json index 7e23bf34..a012d5b1 100644 --- a/ui.frontend/package.json +++ b/ui.frontend/package.json @@ -67,7 +67,6 @@ "i18next-browser-languagedetector": "^5.0.0", "i18next-xhr-backend": "^3.2.2", "react": "^16.13.1", - "react-apollo": "^3.1.5", "react-dom": "^16.13.1", "react-i18next": "^11.7.0", "react-router-dom": "^5.2.0" From 2e584d59436ec1810f42803acb98b47c8e789173 Mon Sep 17 00:00:00 2001 From: "Mark J. Becker" Date: Thu, 29 Oct 2020 14:02:50 +0100 Subject: [PATCH 3/3] CIF-1654 - Add feedback --- ui.frontend/src/main/components/App/App.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui.frontend/src/main/components/App/App.js b/ui.frontend/src/main/components/App/App.js index 24ce6fb3..dd5b2559 100644 --- a/ui.frontend/src/main/components/App/App.js +++ b/ui.frontend/src/main/components/App/App.js @@ -41,6 +41,8 @@ const App = () => { ...partialConfig, storeView, graphqlEndpoint, + // Can be GET or POST. When selecting GET, this applies to cache-able GraphQL query requests only. Mutations + // will always be executed as POST requests. graphqlMethod };