mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 17:26:03 +03:00
[GH-ISSUE #2211] [bug]: Graphql query function incorrectly formats proxy payload #757
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#757
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @cloudomatic on GitHub (Mar 28, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2211
Originally assigned to: @AndrewBastin on GitHub.
Is there an existing issue for this?
Current behavior
When going to the hoppscotch.io page and selecting "GraphQL", the default query works fine (with proxy disabled), and formats the payload as
However enabling the proxy causes the payload to be formatted as
where the "data" attribute is a stringified JSON object, which the server rejects (error 400 - incorrect character at position zero), even though the headers show a content-type of "application/json".
My expectation is that since the content-type is application/json, the payload would be formed as a JSON object and not stringified JSON, with only the "query" attribute stringified (not the "data" attribute).
I get the same error when going to a GraphQL service on the self-hosted version, where the proxy is required because the GraphQL endpoint doesn't support cross-origin requests.
Steps to reproduce
Environment
Production
Version
Cloud
@AndrewBastin commented on GitHub (Mar 29, 2022):
Hi @cloudomatic,
We will look into getting this implemented. Meanwhile, you can use the Hoppscotch Browser Extension as a workaround.
@AndrewBastin commented on GitHub (Apr 18, 2022):
Fixed on 62a5beb.
Closing.
Thank you for reporting @cloudomatic!