Skip to content

Commit cbd20c5

Browse files
committed
fix env vars
1 parent 2e8cb9a commit cbd20c5

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

packages/graphql-playground-electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"homepage": "https://github.com/graphcool/graphql-playground",
55
"repository": "graphcool/graphql-playground",
66
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)",
7-
"version": "1.3.19",
7+
"version": "1.3.20",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",
@@ -94,7 +94,7 @@
9494
"graphcool-tmp-ui": "^0.0.11",
9595
"graphcool-ui": "^0.0.13",
9696
"graphql-config": "^1.1.2",
97-
"graphql-config-extension-graphcool": "1.0.0",
97+
"graphql-config-extension-graphcool": "1.0.1",
9898
"graphql-playground-react": "1.3.20",
9999
"js-yaml": "^3.10.0",
100100
"lodash.merge": "^4.6.0",

packages/graphql-playground-electron/src/renderer/components/App.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ cd ${folderPath}; graphql playground`)
241241
let config
242242

243243
if (input.cwd) {
244+
// use the endpoint as an alternative, only log the error
244245
try {
245246
configPath = findUp.sync(['.graphqlconfig', '.graphqlconfig.yml'], {
246247
cwd: input.cwd,
@@ -252,8 +253,9 @@ cd ${folderPath}; graphql playground`)
252253
? path.basename(path.dirname(configPath))
253254
: undefined
254255
const rawConfig = getGraphQLConfig(input.cwd).config
256+
const resolvedConfig = resolveEnvsInValues(rawConfig, input.env)
255257
config = await patchEndpointsToConfigData(
256-
resolveEnvsInValues(rawConfig, input.env),
258+
resolvedConfig,
257259
input.cwd,
258260
input.env,
259261
)
@@ -268,7 +270,7 @@ cd ${folderPath}; graphql playground`)
268270
return
269271
}
270272
} catch (e) {
271-
//
273+
console.error(e)
272274
}
273275
}
274276

yarn.lock

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4121,6 +4121,25 @@ [email protected]:
41214121
scuid "^1.0.2"
41224122
yaml-ast-parser "^0.0.40"
41234123

4124+
4125+
version "0.2.2"
4126+
resolved "https://registry.yarnpkg.com/graphcool-yml/-/graphcool-yml-0.2.2.tgz#b9f67b6581e149d573f631afdd938cb5f44f9813"
4127+
dependencies:
4128+
ajv "^5.5.1"
4129+
bluebird "^3.5.1"
4130+
debug "^3.1.0"
4131+
dotenv "^4.0.0"
4132+
fs-extra "^4.0.3"
4133+
graphcool-json-schema "1.2.0"
4134+
isomorphic-fetch "^2.2.1"
4135+
js-yaml "^3.10.0"
4136+
json-stable-stringify "^1.0.1"
4137+
jsonwebtoken "^8.1.0"
4138+
lodash "^4.17.4"
4139+
replaceall "^0.1.6"
4140+
scuid "^1.0.2"
4141+
yaml-ast-parser "^0.0.40"
4142+
41244143
graphiql@^0.11.2:
41254144
version "0.11.11"
41264145
resolved "https://registry.yarnpkg.com/graphiql/-/graphiql-0.11.11.tgz#eeaf9a38927dbe8c6ecbf81e700735e16ec50e71"
@@ -4129,7 +4148,14 @@ graphiql@^0.11.2:
41294148
codemirror-graphql "^0.6.11"
41304149
markdown-it "^8.4.0"
41314150

4132-
[email protected], graphql-config-extension-graphcool@^1.0.0:
4151+
4152+
version "1.0.1"
4153+
resolved "https://registry.yarnpkg.com/graphql-config-extension-graphcool/-/graphql-config-extension-graphcool-1.0.1.tgz#841210ddac9ea43d97a3c1faf65555ec5fb6fcbf"
4154+
dependencies:
4155+
graphcool-yml "0.2.2"
4156+
graphql-config "^1.1.4"
4157+
4158+
graphql-config-extension-graphcool@^1.0.0:
41334159
version "1.0.0"
41344160
resolved "https://registry.yarnpkg.com/graphql-config-extension-graphcool/-/graphql-config-extension-graphcool-1.0.0.tgz#aeac68bc54126f17f263058893b556529ec46f94"
41354161
dependencies:
@@ -4192,14 +4218,6 @@ graphql-language-service-utils@^1.0.16:
41924218
graphql-config "1.0.8"
41934219
graphql-language-service-types "^0.1.14"
41944220

4195-
4196-
version "1.4.1"
4197-
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.4.1.tgz#0094054258c9b1a94062952c0a76b1a45e9a2771"
4198-
dependencies:
4199-
dotenv "^4.0.0"
4200-
graphql-config "^1.1.1"
4201-
graphql-config-extension-graphcool "^1.0.0"
4202-
42034221
graphql-playground-middleware@^1.2.1-beta.6:
42044222
version "1.2.1-beta.6"
42054223
resolved "https://registry.yarnpkg.com/graphql-playground-middleware/-/graphql-playground-middleware-1.2.1-beta.6.tgz#b302bda88d28fae716d127a483659c8e70a18776"

0 commit comments

Comments
 (0)