Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Feature: add support for a read hook #63

Merged
merged 9 commits into from
Sep 29, 2021

Conversation

champagnetony
Copy link
Contributor

Adding support for a new plugin with new hooks to handle GrapQL

Description

The Service Client oAuth expects 401 as the status code, but GraphQL returns 200 status code and adds a message in the errors field of the body. This is per the GraphQL specification. As a result, the Service Client is not sending retry requests to refresh the token. The new code handles the new oAuthGraphQL plugin.

Motivation and Context

If fixes issues with graphql endpoints in the Expedia Group network.

How Has This Been Tested?

The code has been unit tested.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the typings as necessary.

@skphi13 skphi13 requested a review from tuckbick September 24, 2021 14:40
Anthony Lauro and others added 2 commits September 24, 2021 11:03
Copy link
Member

@tuckbick tuckbick left a comment

Choose a reason for hiding this comment

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

Looks good, just one thing.

lib/http/request.js Outdated Show resolved Hide resolved
Copy link
Member

@tuckbick tuckbick left a comment

Choose a reason for hiding this comment

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

Looks really good! Just a couple suggested changes.

lib/hooks.js Show resolved Hide resolved
lib/http/request.js Outdated Show resolved Hide resolved
@tuckbick tuckbick changed the title Ech 1045: adding support for EG graphql error messages for retry logic Feature: add support for a read hook Sep 28, 2021
Copy link
Member

@tuckbick tuckbick left a comment

Choose a reason for hiding this comment

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

This looks good! Please amend the CHANGELOG file, and I think we'll be good to go. 👍

@tuckbick tuckbick merged commit 3c6ec65 into ExpediaGroup:master Sep 29, 2021
@champagnetony champagnetony deleted the ECH-1045 branch September 29, 2021 20:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants