-
Notifications
You must be signed in to change notification settings - Fork 81
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-2097 - Consume the configured custom HTTP headers in MagentoGraphqlClient #596
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Update `MagentoGraphqlClient` to consume custom HTTP headers from the CA config * Add unit tests
dplaton
requested review from
buuhuu,
mhaack,
herzog31,
LSantha and
laurentiumagureanu
June 16, 2021 07:51
herzog31
reviewed
Jun 16, 2021
...ore/src/test/java/com/adobe/cq/commerce/core/components/client/MagentoGraphqlClientTest.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #596 +/- ##
=========================================
Coverage 87.90% 87.90%
- Complexity 1363 1372 +9
=========================================
Files 249 250 +1
Lines 6410 6435 +25
Branches 961 964 +3
=========================================
+ Hits 5635 5657 +22
- Misses 580 583 +3
Partials 195 195
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* Filter the configured custom HTTP headers * Fix the unit test (also found a bug in it)
buuhuu
reviewed
Jun 16, 2021
...es/core/src/main/java/com/adobe/cq/commerce/core/components/client/MagentoGraphqlClient.java
Show resolved
Hide resolved
...ore/src/test/java/com/adobe/cq/commerce/core/components/client/MagentoGraphqlClientTest.java
Outdated
Show resolved
Hide resolved
* Update the StoreConfigExporter to expose the configured HTTP headers * Update unit-tests
LSantha
reviewed
Jun 16, 2021
bundles/core/src/main/java/com/adobe/cq/commerce/core/components/client/DeniedHttpHeaders.java
Show resolved
Hide resolved
* Update the React components to use the supplied custom headers * Change the way the headers are exported from the StoreConfigExporterImpl - they are now exported as a JSON string.
herzog31
reviewed
Jun 17, 2021
...commerce/core/components/internal/models/v1/storeconfigexporter/StoreConfigExporterImpl.java
Outdated
Show resolved
Hide resolved
- remove debug logging - ensure that the `getHttpHeaders` method returns a consistent result even in case of failure - add the `getHttpHeaders` method to the interface as well
- increase the version in the package-info
herzog31
approved these changes
Jun 17, 2021
mhaack
approved these changes
Jun 17, 2021
LSantha
approved these changes
Jun 17, 2021
- Consume the custom HTTP headers from the CommerceGraphqlApi.js client library
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Users may configure additional HTTP headers to be sent with each Graphql request, via the
CIF HTTP Custom Headers configuration
service and the cloud service configuration. This PR updates theMagentoGraphqlClient
to consume custom HTTP headers from the CA config.Related Issue
CIF-2097
Motivation and Context
Allow the components to consume the custom HTTP headers.
How Has This Been Tested?
Unit testing, functional testing
Screenshots (if appropriate):
Types of changes
Checklist: