[PR #2944] [MERGED] refactor: optional variables to createEnvironment and fixing the order of initializing GqlClient #4147

Closed
opened 2026-03-17 01:42:38 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/2944
Author: @amk-dev
Created: 3/7/2023
Status: Merged
Merged: 3/7/2023
Merged by: @AndrewBastin

Base: stagingHead: chore/envs-common-changes


📝 Commits (2)

  • 34e7696 refactor: pass variables to createEnvironment instead of using updateEnvironment
  • ff11994 chore: fix the order of initializing GQLClient to prevent runGqlSubscription from not running subscription

📊 Changes

4 files changed (+11 additions, -11 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/environments/my/Details.vue (+1 -2)
📝 packages/hoppscotch-common/src/components/environments/my/Environment.vue (+2 -5)
📝 packages/hoppscotch-common/src/index.ts (+1 -1)
📝 packages/hoppscotch-common/src/newstore/environments.ts (+7 -3)

📄 Description

Before

  1. the createEnvironment store action did not support variables as parameters, we were using two actions createEnvironment and updateEnvironment just for creation.

  2. there existed an edge case where the GQLClient was not initialized when runGqlSubscription was called, which caused the subscription to not run

After

  1. createEnvironment store action accepts optional variables parameter.

  2. Updated the order of initializing GQLClient to prevent runGqlSubscription from not running subscription


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/2944 **Author:** [@amk-dev](https://github.com/amk-dev) **Created:** 3/7/2023 **Status:** ✅ Merged **Merged:** 3/7/2023 **Merged by:** [@AndrewBastin](https://github.com/AndrewBastin) **Base:** `staging` ← **Head:** `chore/envs-common-changes` --- ### 📝 Commits (2) - [`34e7696`](https://github.com/hoppscotch/hoppscotch/commit/34e7696bfbb168db8b695be90640a26aa4fe3bf7) refactor: pass variables to createEnvironment instead of using updateEnvironment - [`ff11994`](https://github.com/hoppscotch/hoppscotch/commit/ff11994363defab9ea8b6764c3e89f3c904c3bcb) chore: fix the order of initializing GQLClient to prevent runGqlSubscription from not running subscription ### 📊 Changes **4 files changed** (+11 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/environments/my/Details.vue` (+1 -2) 📝 `packages/hoppscotch-common/src/components/environments/my/Environment.vue` (+2 -5) 📝 `packages/hoppscotch-common/src/index.ts` (+1 -1) 📝 `packages/hoppscotch-common/src/newstore/environments.ts` (+7 -3) </details> ### 📄 Description **Before** 1. the `createEnvironment` store action did not support variables as parameters, we were using two actions `createEnvironment` and `updateEnvironment` just for creation. 2. there existed an edge case where the GQLClient was not initialized when `runGqlSubscription` was called, which caused the subscription to not run **After** 1. `createEnvironment` store action accepts optional variables parameter. 2. Updated the order of initializing GQLClient to prevent `runGqlSubscription` from not running subscription --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 01:42:38 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4147
No description provided.