Skip to content

Commit 7932b0f

Browse files
committed
v1.3.5
1 parent 00c11ee commit 7932b0f

File tree

12 files changed

+776
-45
lines changed

12 files changed

+776
-45
lines changed
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
{
22
"name": "graphql-playground-html",
3-
"version": "1.2.1-beta.6",
4-
"homepage":
5-
"https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html",
6-
"description":
7-
"GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
3+
"version": "1.3.5",
4+
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-html",
5+
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
86
"contributors": [
97
"Tim Suchanek <[email protected]>",
108
"Johannes Schickling <[email protected]>",
@@ -13,12 +11,19 @@
1311
"repository": "http://github.com/graphcool/graphql-playground.git",
1412
"license": "SEE LICENSE IN LICENSE",
1513
"main": "dist/index.js",
16-
"files": ["dist"],
14+
"files": [
15+
"dist"
16+
],
1717
"scripts": {
1818
"build": "tsc",
1919
"prepublishOnly": "npm run build"
2020
},
21-
"keywords": ["graphql", "graphiql", "playground", "graphcool"],
21+
"keywords": [
22+
"graphql",
23+
"graphiql",
24+
"playground",
25+
"graphcool"
26+
],
2227
"devDependencies": {
2328
"@types/node": "^8.0.47",
2429
"typescript": "^2.6.1"
@@ -28,6 +33,6 @@
2833
"definition": "dist/index.d.ts"
2934
},
3035
"dependencies": {
31-
"find-up": "^2.1.0"
36+
"graphql-config": "^1.0.9"
3237
}
3338
}

packages/graphql-playground-html/src/render-playground-page.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import * as path from 'path'
22
import * as fs from 'fs'
3-
import * as findUp from 'find-up'
3+
import {
4+
getUsedEnvs,
5+
getGraphQLConfig,
6+
findGraphQLConfigFile,
7+
} from 'graphql-config'
48

59
import getLoadingMarkup from './get-loading-markup'
610

@@ -16,13 +20,11 @@ export interface RenderPageOptions extends MiddlewareOptions {
1620
env?: any
1721
}
1822

19-
const configPath = findUp.sync(['.graphqlconfig', '.graphqlconfig.yml'])
20-
const configString = configPath
21-
? fs.readFileSync(configPath, 'utf-8')
22-
: undefined
23-
const folderName = configPath
24-
? path.basename(path.dirname(configPath))
25-
: undefined
23+
const config = getGraphQLConfig().config
24+
const configPath = findGraphQLConfigFile(process.cwd())
25+
const configString = fs.readFileSync(configPath, 'utf-8')
26+
const folderName = path.basename(process.cwd())
27+
const env = getUsedEnvs(config)
2628

2729
const loading = getLoadingMarkup()
2830

@@ -32,7 +34,7 @@ export function renderPlaygroundPage(options: RenderPageOptions) {
3234
configString,
3335
folderName,
3436
canSaveConfig: false,
35-
env: process.env,
37+
env,
3638
}
3739
return `
3840
<!DOCTYPE html>

packages/graphql-playground-html/yarn.lock

Lines changed: 137 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,152 @@
66
version "8.0.53"
77
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.53.tgz#396b35af826fa66aad472c8cb7b8d5e277f4e6d8"
88

9-
find-up@^2.1.0:
10-
version "2.1.0"
11-
resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7"
9+
argparse@^1.0.7:
10+
version "1.0.9"
11+
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86"
1212
dependencies:
13-
locate-path "^2.0.0"
13+
sprintf-js "~1.0.2"
1414

15-
locate-path@^2.0.0:
16-
version "2.0.0"
17-
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
15+
balanced-match@^1.0.0:
16+
version "1.0.0"
17+
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
18+
19+
brace-expansion@^1.1.7:
20+
version "1.1.8"
21+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
1822
dependencies:
19-
p-locate "^2.0.0"
20-
path-exists "^3.0.0"
23+
balanced-match "^1.0.0"
24+
concat-map "0.0.1"
25+
26+
27+
version "0.0.1"
28+
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
29+
30+
31+
version "0.0.8"
32+
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-0.0.8.tgz#01ed94dc407df2c00f1807fde700a7cfa48a205c"
33+
dependencies:
34+
node-fetch "1.7.3"
35+
whatwg-fetch "2.0.3"
36+
37+
encoding@^0.1.11:
38+
version "0.1.12"
39+
resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
40+
dependencies:
41+
iconv-lite "~0.4.13"
42+
43+
esprima@^4.0.0:
44+
version "4.0.0"
45+
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
46+
47+
fs.realpath@^1.0.0:
48+
version "1.0.0"
49+
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
50+
51+
glob@^7.0.5:
52+
version "7.1.2"
53+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
54+
dependencies:
55+
fs.realpath "^1.0.0"
56+
inflight "^1.0.4"
57+
inherits "2"
58+
minimatch "^3.0.4"
59+
once "^1.3.0"
60+
path-is-absolute "^1.0.0"
61+
62+
graphql-config@^1.0.9:
63+
version "1.0.9"
64+
resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-1.0.9.tgz#8fa416a7c2bdb8f62f441324775dd3ff8a266652"
65+
dependencies:
66+
graphql "^0.11.7"
67+
graphql-request "^1.4.0"
68+
js-yaml "^3.10.0"
69+
minimatch "^3.0.4"
70+
rimraf "^2.6.2"
71+
72+
graphql-request@^1.4.0:
73+
version "1.4.0"
74+
resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.4.0.tgz#f5b067c83070296d93fb45760e83dfad0d9f537a"
75+
dependencies:
76+
cross-fetch "0.0.8"
77+
78+
graphql@^0.11.7:
79+
version "0.11.7"
80+
resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6"
81+
dependencies:
82+
iterall "1.1.3"
83+
84+
iconv-lite@~0.4.13:
85+
version "0.4.19"
86+
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
2187

22-
p-limit@^1.1.0:
88+
inflight@^1.0.4:
89+
version "1.0.6"
90+
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
91+
dependencies:
92+
once "^1.3.0"
93+
wrappy "1"
94+
95+
inherits@2:
96+
version "2.0.3"
97+
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
98+
99+
is-stream@^1.0.1:
23100
version "1.1.0"
24-
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.1.0.tgz#b07ff2d9a5d88bec806035895a2bab66a27988bc"
101+
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
102+
103+
104+
version "1.1.3"
105+
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.3.tgz#1cbbff96204056dde6656e2ed2e2226d0e6d72c9"
106+
107+
js-yaml@^3.10.0:
108+
version "3.10.0"
109+
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
110+
dependencies:
111+
argparse "^1.0.7"
112+
esprima "^4.0.0"
113+
114+
minimatch@^3.0.4:
115+
version "3.0.4"
116+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
117+
dependencies:
118+
brace-expansion "^1.1.7"
25119

26-
p-locate@^2.0.0:
27-
version "2.0.0"
28-
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43"
120+
121+
version "1.7.3"
122+
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
29123
dependencies:
30-
p-limit "^1.1.0"
124+
encoding "^0.1.11"
125+
is-stream "^1.0.1"
31126

32-
path-exists@^3.0.0:
33-
version "3.0.0"
34-
resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515"
127+
once@^1.3.0:
128+
version "1.4.0"
129+
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
130+
dependencies:
131+
wrappy "1"
132+
133+
path-is-absolute@^1.0.0:
134+
version "1.0.1"
135+
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
136+
137+
rimraf@^2.6.2:
138+
version "2.6.2"
139+
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
140+
dependencies:
141+
glob "^7.0.5"
142+
143+
sprintf-js@~1.0.2:
144+
version "1.0.3"
145+
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
35146

36147
typescript@^2.6.1:
37148
version "2.6.2"
38149
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
150+
151+
152+
version "2.0.3"
153+
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
154+
155+
wrappy@1:
156+
version "1.0.2"
157+
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"

packages/graphql-playground-middleware-express/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-express",
3-
"version": "1.3.3",
3+
"version": "1.3.5",
44
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware-express",
55
"description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).",
66
"contributors": [
@@ -32,13 +32,11 @@
3232
"typescript": "^2.6.1"
3333
},
3434
"dependencies": {
35-
"graphql-playground-html": "^1.2.0"
35+
"graphql-playground-html": "^1.3.5",
36+
"graphql-playground-middleware": "^1.2.1-beta.6"
3637
},
3738
"typings": "dist/index.d.ts",
3839
"typescript": {
3940
"definition": "dist/index.d.ts"
40-
},
41-
"dependencies": {
42-
"graphql-playground-middleware": "^1.2.1-beta.6"
4341
}
4442
}

0 commit comments

Comments
 (0)