mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 17:26:03 +03:00
[GH-ISSUE #4500] [bug]: GraphQL Requests not saved to DB #1643
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#1643
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 @rb090 on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4500
Is there an existing issue for this?
Current behavior
When I create a new GraphQL request within a Hoppscotch GraphQL request collection, its content gets not saved properly to the connected database to
UserRequest.requestinto the propertiesqueryandvariables.I am running Hoppscotch Community Edition via Docker AIO container on version
v2024.9.3. It is connected to a PSQL DB.Steps to reproduce
UserRequestwe see that the attributes inrequestare not matching the request saved in the UI:Could it be that I need to change sth within my configuration? This is how
.envis looking like:Environment
Production
Version
Self-hosted
@AndrewBastin commented on GitHub (Nov 13, 2024):
Should be fixed as of 2024.10.2
@jamesgeorge007 commented on GitHub (Nov 14, 2024):
Hi @rb090, while you add a request, could you check if clicking on the request from the collection tree for the second time opens a new tab with the association being kept (any further updates are recorded correctly)? You can find a pill next to the request in the tree when it's open in a tab indicating it's the active item. Observe the association wasn't kept when the tab was open with the request being created, but during the second attempt, it would be marked as an active entry.
We were able to reproduce issues with requests from the GraphQL collection tree and the tab getting dissociated following certain actions that can lead to a flow where the updates to the original request are lost and a fix is up for the same.
@rb090 commented on GitHub (Nov 14, 2024):
Hi @jamesgeorge007,
I am sorry for the late reply. Thank you so much that you are looking into this issue. We really appreciate this a lot.
No it does not. Lets say I have a request "TestQuery". If "TestQuery" is open in a tab and I click again on the request item in the collection, that does not happen.
If no query "TestQuery" is open in a tab, I click on it in the collection once I created it, tab is opened and the green dot appers.
Updates on the request are saved until I do a reload in my browser 😔.
Good catch, you are right on this.
@jamesgeorge007 commented on GitHub (Nov 15, 2024):
In this case, was the request open in a tab following the create action with no active indicator next to the request from the collection tree? Could you send a screen recording of this flow here or via the existing communication channel with @AndrewBastin as you prefer with any sensitive contents redacted?
Also, if possible, at this stage, could you send the contents against the keys
collectionsGraphqlandgqlTabStatefromlocalStorage(sensitive contents redacted) that might help with reproducing on our end? Based on the investigation so far, the underlying issue occurs when the request open under the tab following the create action is not the original request from the collection tree.@rb090 commented on GitHub (Nov 15, 2024):
@jamesgeorge007 what do you think in having a call where we can debug and have a look together? I have the feeling that might be easier. If you agree please share with me how you are available and I can setup us sth.
@jamesgeorge007 commented on GitHub (Nov 18, 2024):
I had a chat with @AndrewBastin. Since there is already a fix addressing the concern about requests not getting synced to the workspace arising from the collection tree and tab state dissociating, let's schedule a call after the release as required if there are further concerns :)
@rb090 commented on GitHub (Nov 18, 2024):
Thanks a lot for getting back to me @jamesgeorge007 and for working on this fix with @AndrewBastin 🙌💗. So we wait for the next release
v2024.10.3? And once the new release is out I would then test again and get back to you.@jamesgeorge007 commented on GitHub (Nov 20, 2024):
A quick update regarding a change in the release plan. The
v2024.11.0major release is scheduled for next week and the above fix will be part of the same.@rb090 commented on GitHub (Nov 20, 2024):
@jamesgeorge007 oh wow that are awesome news, thank you so much for your update on this and for taking care of this issue 🙌🍾. Looking forward to it. I will test with the new release and let you know in this ticket how it goes.
@jamesgeorge007 commented on GitHub (Nov 28, 2024):
Hi, the above fix is now released in v2024.11.0. Please let us know if the issue persists.
Ensure to close the active tabs and start afresh.
@rb090 commented on GitHub (Dec 2, 2024):
Hi @jamesgeorge007,
Thank you so much for the update and the fix 🙌! I hope you don’t mind the delay in my response, I was out of the office. I had the chance to test your fix today.
It seems that adding GraphQL requests initially works perfectly, and all requests are added correctly with their content. However, once a request is saved, it’s not possible to make changes to it. Modifications to existing GraphQL requests aren’t being applied. When I check the database, the changes aren’t reflected there either.
Could you please also let me know how to share GraphQL requests with teammates? For example, GraphQL requests I created aren't visible to any of my colleagues. Do workspaces not support sharing GraphQL requests?
@jamesgeorge007 commented on GitHub (Dec 2, 2024):
No worries, thanks for getting back.
Could you post a screen recording of the flow?
So currently, GraphQL applies only to the personal workspace, ref.
@rb090 commented on GitHub (Dec 3, 2024):
Thank you so much for getting back to me @jamesgeorge007 and for providing the clarifications! I really appreciate your prompt response 🙌.
I understand that GraphQL is currently limited to personal workspaces. But it would be incredibly helpful for our team if we could share these across our workspace. Is there any chance this feature could be introduced soon? Are there any plans?
Additionally, I recorded a quick screencast to demonstrate an issue I encountered. In the video, I open an existing request, make some changes, and then open a new tab to re-open the modified request. However, as shown, the attributes I removed still appear. I hope the video provides clarity, but I'm happy to jump on a call if further discussion is needed 🙂.
https://github.com/user-attachments/assets/ad58db99-f834-4fe3-a665-65a6f89bd618
@jamesgeorge007 commented on GitHub (Dec 3, 2024):
There are no immediate plans but, we have it in the pipeline. You can keep an eye on the open issues :)
Thanks. We'll investigate further.
@jamesgeorge007 commented on GitHub (Dec 23, 2024):
Hi, we have a patch that went out with the v2024.12.0 release, which addresses issues with request syncing. Could you take a look when you get a chance?
@rb090 commented on GitHub (Dec 29, 2024):
Thank you so much, @jamesgeorge007, for letting me know and for providing the patch! I tested the new version today, and everything looks great so far. I modified existing requests, deleted collections with requests, and created new collections with requests. Everything seems to be working perfectly from what I can see.
Thank you again for addressing these issues. Wishing you and the entire team a happy and healthy New Year! 🎉🎆
@jamesgeorge007 commented on GitHub (Jan 1, 2025):
Awesome, thanks for confirming; closing this issue. Happy New Year 🥳