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

Handle request body objects in GraphQL proxy#106

Merged
thecodepixi merged 1 commit intomainfrom
parse-in-proxy
Feb 10, 2021
Merged

Handle request body objects in GraphQL proxy#106
thecodepixi merged 1 commit intomainfrom
parse-in-proxy

Conversation

@thecodepixi
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread src/utils/test/graphql_proxy.test.ts Outdated
Comment thread src/utils/graphql_proxy.ts
@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants