feat: cleaner save context handling for graphql (#3282)

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
This commit is contained in:
Andrew Bastin
2023-08-24 19:07:17 +05:30
committed by GitHub
parent a9a4ebf595
commit b08b63dc73
16 changed files with 365 additions and 42 deletions

View File

@@ -265,7 +265,7 @@ export default defineComponent({
this.$data.editingCollectionIndex = collectionIndex
this.displayModalEdit(true)
},
onAddRequest({ name, path }) {
onAddRequest({ name, path, index }) {
const newRequest = {
...currentActiveTab.value.document.request,
name,
@@ -274,6 +274,11 @@ export default defineComponent({
saveGraphqlRequestAs(path, newRequest)
createNewTab({
saveContext: {
originLocation: "user-collection",
folderPath: path,
requestIndex: index,
},
request: newRequest,
isDirty: false,
})