Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
build: use GraphQL URL from env in gql-codegen (#2749)
jerbob9280de63323db2
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex 55aa9a834..23c80ffc8 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -19,6 +19,8 @@ jobs:- uses: actions/setup-node@v2- name: Setup and run pnpm installuses: pnpm/[email protected]+ env:+ VITE_BACKEND_GQL_URL: ${{ secrets.BACKEND_GQL_URL }}with:version: 7run_install: truediff --git a/packages/hoppscotch-app/gql-codegen.yml b/packages/hoppscotch-app/gql-codegen.ymlindex dc6cdea45..95aae7258 100644--- a/packages/hoppscotch-app/gql-codegen.yml+++ b/packages/hoppscotch-app/gql-codegen.yml@@ -1,5 +1,6 @@overwrite: true-schema: https://api.hoppscotch.io/graphql+schema:+ - ${VITE_BACKEND_GQL_URL}generates:src/helpers/backend/graphql.ts:documents: "src/**/*.graphql"diff --git a/packages/hoppscotch-app/package.json b/packages/hoppscotch-app/package.jsonindex 5cd7fccfa..a1cb9a296 100644--- a/packages/hoppscotch-app/package.json+++ b/packages/hoppscotch-app/package.json@@ -5,14 +5,14 @@"scripts": {"dev": "pnpm exec npm-run-all -p -l dev:*","dev:vite": "vite",- "dev:gql-codegen": "graphql-codegen --config gql-codegen.yml --watch",+ "dev:gql-codegen": "graphql-codegen --require dotenv/config --config gql-codegen.yml --watch","build": "node --max_old_space_size=16384 ./node_modules/vite/bin/vite.js build","lint": "eslint src --ext .ts,.js,.vue --ignore-path .gitignore .","prod-lint": "cross-env HOPP_LINT_FOR_PROD=true pnpm run lint","lintfix": "eslint --fix src --ext .ts,.js,.vue --ignore-path .gitignore .","generate": "pnpm run build","preview": "vite preview",- "gql-codegen": "graphql-codegen --config gql-codegen.yml",+ "gql-codegen": "graphql-codegen --require dotenv/config --config gql-codegen.yml","postinstall": "pnpm run gql-codegen","do-dev": "pnpm run dev","do-build-prod": "pnpm run build",