Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CIF-1654 - CIF React Core Components should support GraphQL GET requests #80

Merged
merged 8 commits into from
Nov 2, 2020
2 changes: 1 addition & 1 deletion .circleci/ci/it-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tmp/
local.properties
.settings/
.loadpath
.DS_Store

# Eclipse Core
.project
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<vault.password>admin</vault.password>
<core.wcm.components.version>2.10.0</core.wcm.components.version>
<core.cif.components.version>1.4.1-SNAPSHOT</core.cif.components.version>
<graphql.client.version>1.6.1</graphql.client.version>
<graphql.client.version>1.7.0</graphql.client.version>
<magento.graphql.version>6.0.0-magento235</magento.graphql.version>
<bnd.version>5.1.2</bnd.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
85 changes: 2 additions & 83 deletions ui.frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ui.frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions ui.frontend/src/main/components/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether we should make it more explicit that this setting affects only the queries and not the mutations...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dplaton good point. Where do you think would be the best place to document this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the moment we can only leave a comment in the code. Sadly, we don't have any clear documentation now.

const { mountingPoints, pagePaths } = partialConfig;
const config = {
...partialConfig,
storeView,
graphqlEndpoint
graphqlEndpoint,
graphqlMethod
};

return (
Expand Down