Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve GraphQL collection tree and tab dissociation issues #4537

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Nov 14, 2024

This PR aims to resolve the issues with the GraphQL workspace, where requests from the collection tree and the ones open under tabs get dissociated following certain actions.

Dissociation due to request move and overwrite via spotlight Save as new request actions are beyond the scope.

Closes HFE-546 #4500.

What's changed

  • The saveGraphqlRequestAs function exposed from the store premises, invoking the underlying dispatcher now returns the insertion index for the request being added.
  • Updates the places of consumption of the above to leverage the insertion index and resolve issues with the pre-existing implementation where the request index came up as undefined resulting in dissociation with the tab.
  • Updates signature for the OnAddRequest method in the CollectionGraphql component removing index (resolved as undefined) from the incoming data and leveraging the request index instead.
  • Resolve type errors in the CollectionsGraphqlAddRequest component.
  • Updates the GQL tab request save context schema enabling requirement for the requestIndex field existence as a follow up of feat: duplicate REST/GraphQL collections #4211.

Notes to reviewers

Please ensure to verify actions except for moves and overwrites via the Save as new request from the spotlight with requests from the collection tree and that the association is kept with the tabs in which they're open:

  • Adding request under a root/child level collection.
  • Saving the request open in the current tab under a collection. It should open the above request in a new tab.
  • Editing a request.
  • The above actions within the Save as modal.

@jamesgeorge007 jamesgeorge007 linked an issue Nov 14, 2024 that may be closed by this pull request
1 task
@jamesgeorge007 jamesgeorge007 force-pushed the fix/gql-collection-tree-tab-sync branch 4 times, most recently from 4e733a2 to c3ee0b7 Compare November 19, 2024 06:24
@jamesgeorge007 jamesgeorge007 changed the base branch from patch to next November 21, 2024 11:58
@jamesgeorge007 jamesgeorge007 force-pushed the fix/gql-collection-tree-tab-sync branch from c3ee0b7 to 1a22c54 Compare November 21, 2024 12:01
@jamesgeorge007 jamesgeorge007 force-pushed the fix/gql-collection-tree-tab-sync branch from 1a22c54 to 1fa7352 Compare November 22, 2024 16:53
@jamesgeorge007 jamesgeorge007 changed the title fix: resolve dissociation issues with GraphQL collection tree and tab fix: resolve GraphQL collection tree and tab dissociation issues Nov 22, 2024
@jamesgeorge007 jamesgeorge007 merged commit e040f44 into next Nov 22, 2024
1 check passed
@jamesgeorge007 jamesgeorge007 deleted the fix/gql-collection-tree-tab-sync branch November 22, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: GraphQL Requests not saved to DB
2 participants