mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4972] [bug]: GraphQL collection does not inherits auth #1886
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#1886
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 @ytatichno on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4972
Originally assigned to: @nivedin on GitHub.
Is there an existing issue for this?
Current behavior
I have GraphQL query in my desktop Windows client that depends on Bearer authentication(authorization).
I can't use collection token bearer inheritance. And via header field too.
v2025.3.0
Steps to reproduce
Usecase:
Some tries:
Logs and Screenshots
Fun part, when I set same token in the collection with Bearer and some query from this collection with Bearer, it had duplicated(with same token) fields in headers and it worked:
^^^It works
But when I set the query auth type back to Inherit and it showed only one field with that token, it failed:
^^^It fails
And exported collection(I manually cut most of queries) if it will help:
hoppscotch-gql-collections.json
Environment
Release
Hoppscotch Version
Local
Interceptor
Native - Desktop App
Browsers Affected
Not applicable (Desktop app)
Operating System
Windows
Additional Information
No response
@nivedin commented on GitHub (Apr 10, 2025):
@ytatichno Thank you for the detailed explanation, we tried to repro the issue with the provided collection and we couldn't find any issue with the properties inheritance flow. Can you let me know the app version you are using.
@ytatichno commented on GitHub (Apr 10, 2025):
@nivedin thank you for your fast reply. I found this in
v2025.3.0in my Windows 11 desktop app as I said, today I updated tov2025.3.1and nothing changed. There is screen record with bug reproduction:https://github.com/user-attachments/assets/a17c7bd7-01e8-49d8-b251-304130352277
As you can see, same token causes diffrent answer depends on if it is inherited or not.
@ktriple commented on GitHub (Apr 14, 2025):
Interesting, in our regular REST API the JWT is also not inherited with at least the oAuth 2.0 authorization. We just get a really old token that somewhere seems to be saved.
I've looked in all folder properties and unset / set the authoriation tab to inherit, oAuth 2.0 and back.
We're working in both the Web Version directly and the Mac OS app version (25.3.1 - 20250410.084640). Both experience the same issue.
@imironyak commented on GitHub (May 10, 2025):
I have the same issue in both Mac and Web apps (v2025.4.2)
@Shadowghost commented on GitHub (Jun 19, 2025):
This is still happening in
2025.5.3but it seems like #5154 fixed the inheritance for at least connecting to the GraphQL, but the auth header is still missing when firing the actual query, so collection auth is still essentially broken for GraphQL requests.@Shadowghost commented on GitHub (Jul 30, 2025):
Still broken in 2025.7.0 - the inheritance is properly shown in the GraphQL interface, as is the Authorization header but the actual request does not include the header when executing the query.
Also, the response log seems to be off. Graphql returns 401 but you can only know this if you use the Browser Interceptor and cehck the Dev tool network tab yourself, in the Hoppscotch UI you onle get a "Invalid JSON response" and empty Raw.