Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Handle request body objects in GraphQL proxy #106

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

thecodepixi
Copy link
Contributor

WHY are these changes introduced?

The GraphQL Proxy was always passing the request body as a string, but in the case where there is a variable passed, the body will be JSON.

WHAT is this pull request doing?

Updates GraphQL Proxy to attempt to parse the incoming request body. If it's able to parse an object, that object will be passed to the client. Otherwise, it will pass the received string.

Type of change

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

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@thecodepixi thecodepixi marked this pull request as ready for review February 10, 2021 21:10
@thecodepixi thecodepixi requested a review from a team as a code owner February 10, 2021 21:10
Copy link
Contributor

@paulomarg paulomarg left a comment

Choose a reason for hiding this comment

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

Good stuff, LGTM!

src/utils/test/graphql_proxy.test.ts Outdated Show resolved Hide resolved
@thecodepixi thecodepixi merged commit 8627013 into main Feb 10, 2021
@thecodepixi thecodepixi deleted the parse-in-proxy branch February 10, 2021 21:59
@paulomarg paulomarg temporarily deployed to production February 18, 2021 16:24 Inactive
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants