diff --git a/packages/hoppscotch-common/src/components/collections/graphql/index.vue b/packages/hoppscotch-common/src/components/collections/graphql/index.vue index 7577b121..cd454fc3 100644 --- a/packages/hoppscotch-common/src/components/collections/graphql/index.vue +++ b/packages/hoppscotch-common/src/components/collections/graphql/index.vue @@ -512,8 +512,9 @@ const duplicateRequest = async ({ }) => { const isValidToken = await handleTokenValidation() if (!isValidToken) return + const { id: _, ...requestWithoutID } = request saveGraphqlRequestAs(folderPath, { - ...cloneDeep(request), + ...cloneDeep(requestWithoutID), name: `${request.name} - ${t("action.duplicate")}`, }) } diff --git a/packages/hoppscotch-common/src/components/collections/index.vue b/packages/hoppscotch-common/src/components/collections/index.vue index 6a25a51f..f0771c37 100644 --- a/packages/hoppscotch-common/src/components/collections/index.vue +++ b/packages/hoppscotch-common/src/components/collections/index.vue @@ -1564,8 +1564,9 @@ const duplicateRequest = async (payload: { const { folderPath, request } = payload if (!folderPath) return + const { id: _, ...requestWithoutID } = request const newRequest = { - ...cloneDeep(request), + ...cloneDeep(requestWithoutID), _ref_id: generateUniqueRefId("req"), name: `${request.name} - ${t("action.duplicate")}`, }