-
- {{ folder.name ? folder.name : folder.title }}
+
+
-
+
+
+ {{ folder.name ? folder.name : folder.title }}
+
+
+
-
-
-
-
-
- {{ request.name }}
+
+
-
+
+ {{ request.name }}
+ v-if="isActive"
+ v-tippy="{ theme: 'tooltip' }"
+ class="relative mx-3 flex h-1.5 w-1.5 flex-shrink-0"
+ :title="`${t('collection.request_in_use')}`"
+ >
+
+
+
+
-
+
-
diff --git a/packages/hoppscotch-common/src/components/graphql/Headers.vue b/packages/hoppscotch-common/src/components/graphql/Headers.vue
index 7b9207b1f..03f0823e7 100644
--- a/packages/hoppscotch-common/src/components/graphql/Headers.vue
+++ b/packages/hoppscotch-common/src/components/graphql/Headers.vue
@@ -271,6 +271,7 @@ import { useCodemirror } from "@composables/codemirror"
import { objRemoveKey } from "~/helpers/functional/object"
import { useVModel } from "@vueuse/core"
import { HoppGQLHeader } from "~/helpers/graphql"
+import { throwError } from "~/helpers/functional/error"
const colorMode = useColorMode()
const t = useI18n()
@@ -386,7 +387,6 @@ watch(workingHeaders, (newWorkingHeaders) => {
)
)
- console.log("not-equal", workingHeaders.value)
if (!isEqual(request.value.headers, fixedHeaders)) {
request.value.headers = cloneDeep(fixedHeaders)
}
@@ -479,7 +479,11 @@ const deleteHeader = (index: number) => {
})
}
- workingHeaders.value.splice(index, 1)
+ workingHeaders.value = pipe(
+ workingHeaders.value,
+ A.deleteAt(index),
+ O.getOrElseW(() => throwError("Working Headers Deletion Out of Bounds"))
+ )
}
const clearContent = () => {
@@ -577,6 +581,4 @@ const mask = (header: any) => {
// if (tab === "auth") emit("change-tab", "authorization")
// else emit("change-tab", "bodyParams")
// }
-
-console.log("compoyed-header", computedHeaders.value)
diff --git a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
index 77c674a59..aa82c2a32 100644
--- a/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
+++ b/packages/hoppscotch-common/src/components/graphql/RequestOptions.vue
@@ -99,18 +99,15 @@ const props = withDefaults(
optionTab: "query",
}
)
-const emit = defineEmits(["update:modelValue", "update:response"])
+const emit = defineEmits<{
+ (e: "update:modelValue", value: HoppGQLRequest): void
+ (e: "update:optionTab", value: GQLOptionTabs): void
+ (e: "update:response", value: GQLResponseEvent[]): void
+}>()
+
const selectedOptionTab = useVModel(props, "optionTab", emit)
-const request = ref(props.modelValue)
-
-watch(
- () => request.value,
- (newVal) => {
- emit("update:modelValue", newVal)
- },
- { deep: true }
-)
+const request = useVModel(props, "modelValue", emit)
const url = computedWithControl(
() => tabs.currentActiveTab.value,