Skip to content

Commit

Permalink
fix env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jan 4, 2018
1 parent 2e8cb9a commit cbd20c5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/graphql-playground-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"homepage": "https://github.com/graphcool/graphql-playground",
"repository": "graphcool/graphql-playground",
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)",
"version": "1.3.19",
"version": "1.3.20",
"author": {
"name": "Graphcool",
"email": "hello@graph.cool",
Expand Down Expand Up @@ -94,7 +94,7 @@
"graphcool-tmp-ui": "^0.0.11",
"graphcool-ui": "^0.0.13",
"graphql-config": "^1.1.2",
"graphql-config-extension-graphcool": "1.0.0",
"graphql-config-extension-graphcool": "1.0.1",
"graphql-playground-react": "1.3.20",
"js-yaml": "^3.10.0",
"lodash.merge": "^4.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ cd ${folderPath}; graphql playground`)
let config

if (input.cwd) {
// use the endpoint as an alternative, only log the error
try {
configPath = findUp.sync(['.graphqlconfig', '.graphqlconfig.yml'], {
cwd: input.cwd,
Expand All @@ -252,8 +253,9 @@ cd ${folderPath}; graphql playground`)
? path.basename(path.dirname(configPath))
: undefined
const rawConfig = getGraphQLConfig(input.cwd).config
const resolvedConfig = resolveEnvsInValues(rawConfig, input.env)
config = await patchEndpointsToConfigData(
resolveEnvsInValues(rawConfig, input.env),
resolvedConfig,
input.cwd,
input.env,
)
Expand All @@ -268,7 +270,7 @@ cd ${folderPath}; graphql playground`)
return
}
} catch (e) {
//
console.error(e)
}
}

Expand Down
36 changes: 27 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4121,6 +4121,25 @@ graphcool-yml@0.2.1:
scuid "^1.0.2"
yaml-ast-parser "^0.0.40"

graphcool-yml@0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/graphcool-yml/-/graphcool-yml-0.2.2.tgz#b9f67b6581e149d573f631afdd938cb5f44f9813"
dependencies:
ajv "^5.5.1"
bluebird "^3.5.1"
debug "^3.1.0"
dotenv "^4.0.0"
fs-extra "^4.0.3"
graphcool-json-schema "1.2.0"
isomorphic-fetch "^2.2.1"
js-yaml "^3.10.0"
json-stable-stringify "^1.0.1"
jsonwebtoken "^8.1.0"
lodash "^4.17.4"
replaceall "^0.1.6"
scuid "^1.0.2"
yaml-ast-parser "^0.0.40"

graphiql@^0.11.2:
version "0.11.11"
resolved "https://registry.yarnpkg.com/graphiql/-/graphiql-0.11.11.tgz#eeaf9a38927dbe8c6ecbf81e700735e16ec50e71"
Expand All @@ -4129,7 +4148,14 @@ graphiql@^0.11.2:
codemirror-graphql "^0.6.11"
markdown-it "^8.4.0"

graphql-config-extension-graphcool@1.0.0, graphql-config-extension-graphcool@^1.0.0:
graphql-config-extension-graphcool@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/graphql-config-extension-graphcool/-/graphql-config-extension-graphcool-1.0.1.tgz#841210ddac9ea43d97a3c1faf65555ec5fb6fcbf"
dependencies:
graphcool-yml "0.2.2"
graphql-config "^1.1.4"

graphql-config-extension-graphcool@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/graphql-config-extension-graphcool/-/graphql-config-extension-graphcool-1.0.0.tgz#aeac68bc54126f17f263058893b556529ec46f94"
dependencies:
Expand Down Expand Up @@ -4192,14 +4218,6 @@ graphql-language-service-utils@^1.0.16:
graphql-config "1.0.8"
graphql-language-service-types "^0.1.14"

graphql-playground-html@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/graphql-playground-html/-/graphql-playground-html-1.4.1.tgz#0094054258c9b1a94062952c0a76b1a45e9a2771"
dependencies:
dotenv "^4.0.0"
graphql-config "^1.1.1"
graphql-config-extension-graphcool "^1.0.0"

graphql-playground-middleware@^1.2.1-beta.6:
version "1.2.1-beta.6"
resolved "https://registry.yarnpkg.com/graphql-playground-middleware/-/graphql-playground-middleware-1.2.1-beta.6.tgz#b302bda88d28fae716d127a483659c8e70a18776"
Expand Down

0 comments on commit cbd20c5

Please sign in to comment.