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

This commit is contained in:
James George
2024-11-22 09:01:00 -08:00
committed by GitHub
parent 73f3e54c00
commit e040f44245
6 changed files with 78 additions and 24 deletions

View File

@@ -400,21 +400,13 @@ const duplicateCollection = ({
collectionSyncID?: string
}) => duplicateGraphQLCollection(path, collectionSyncID)
const onAddRequest = ({
name,
path,
index,
}: {
name: string
path: string
index: number
}) => {
const onAddRequest = ({ name, path }: { name: string; path: string }) => {
const newRequest = {
...tabs.currentActiveTab.value.document.request,
name,
}
saveGraphqlRequestAs(path, newRequest)
const insertionIndex = saveGraphqlRequestAs(path, newRequest)
const { auth, headers } = cascadeParentCollectionForHeaderAuth(
path,
@@ -425,7 +417,7 @@ const onAddRequest = ({
saveContext: {
originLocation: "user-collection",
folderPath: path,
requestIndex: index,
requestIndex: insertionIndex,
},
request: newRequest,
isDirty: false,