Skip to content

Commit 7f3b142

Browse files
authored
Merge branch 'master' into refactor/to-sc
2 parents 7018ca7 + 0bbe916 commit 7f3b142

File tree

28 files changed

+728
-316
lines changed

28 files changed

+728
-316
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": "Playground app",
7-
"version": "1.1.1",
7+
"version": "1.1.6",
88
"author": {
99
"name": "Graphcool",
1010
"email": "[email protected]",
@@ -130,7 +130,7 @@
130130
"extract-text-webpack-plugin": "^2.0.0-beta.3",
131131
"file-loader": "^0.11.2",
132132
"fork-ts-checker-webpack-plugin": "^0.1.5",
133-
"graphql-playground": "^1.1.0",
133+
"graphql-playground": "^1.1.6",
134134
"happypack": "^3.1.0",
135135
"html-webpack-plugin": "^2.30.1",
136136
"identity-obj-proxy": "^3.0.0",

packages/graphql-playground-electron/src/ElectronApp.tsx

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,12 @@ export default class ElectronApp extends React.Component<{}, State> {
109109
// Select first enpoind found
110110
const activeEndpoint = projectsState[0].endpoints[0]
111111

112-
this.setState(
113-
{
114-
openInitialView: false,
115-
activeEndpoint,
116-
endpoint: activeEndpoint.url,
117-
projects: projectsState,
118-
} as State,
119-
)
112+
this.setState({
113+
openInitialView: false,
114+
activeEndpoint,
115+
endpoint: activeEndpoint.url,
116+
projects: projectsState,
117+
} as State)
120118
} catch (error) {
121119
alert(error)
122120
}
@@ -132,9 +130,9 @@ export default class ElectronApp extends React.Component<{}, State> {
132130
}
133131

134132
handleChangeTheme = () => {
135-
this.setState(
136-
{ theme: this.state.theme === 'dark' ? 'light' : 'dark' } as State,
137-
)
133+
this.setState({
134+
theme: this.state.theme === 'dark' ? 'light' : 'dark',
135+
} as State)
138136
}
139137

140138
handleOpenNewWindow = () => {
@@ -176,7 +174,10 @@ export default class ElectronApp extends React.Component<{}, State> {
176174
componentWillUnmount() {
177175
ipcRenderer.removeListener('Tab', this.readTabMessage)
178176
ipcRenderer.removeListener('File', this.readFileMessage)
179-
ipcRenderer.removeListener('OpenSelectedFile', this.readOpenSelectedFileMessage)
177+
ipcRenderer.removeListener(
178+
'OpenSelectedFile',
179+
this.readOpenSelectedFileMessage,
180+
)
180181
}
181182

182183
readFileMessage = (error, message) => {
@@ -208,9 +209,7 @@ export default class ElectronApp extends React.Component<{}, State> {
208209
localStorage.setItem('platformToken', rc.platformToken)
209210
}
210211

211-
const permissionSession = this.getPermissionSessionForPath(
212-
fileToOpen,
213-
)
212+
const permissionSession = this.getPermissionSessionForPath(fileToOpen)
214213

215214
this.playground.newPermissionTab(
216215
permissionSession,
@@ -221,19 +220,22 @@ export default class ElectronApp extends React.Component<{}, State> {
221220
}
222221

223222
showOpenDialog() {
224-
dialog.showOpenDialog({
225-
title: 'Choose a .graphql file to edit',
226-
properties: ['openFile'],
227-
// filters: [{
228-
// name: '*',
229-
// extensions: ['graphql']
230-
// }]
231-
}, fileNames => {
232-
if (fileNames && fileNames.length > 0) {
233-
const file = fileNames[0]
234-
this.openFile(file)
235-
}
236-
})
223+
dialog.showOpenDialog(
224+
{
225+
title: 'Choose a .graphql file to edit',
226+
properties: ['openFile'],
227+
// filters: [{
228+
// name: '*',
229+
// extensions: ['graphql']
230+
// }]
231+
},
232+
fileNames => {
233+
if (fileNames && fileNames.length > 0) {
234+
const file = fileNames[0]
235+
this.openFile(file)
236+
}
237+
},
238+
)
237239
}
238240

239241
getSaveFileName(): Promise<string> {
@@ -378,7 +380,7 @@ export default class ElectronApp extends React.Component<{}, State> {
378380
letter-spacing: 0.5px;
379381
}
380382
body .root .tabs.isApp {
381-
padding-left: 58px;
383+
padding-left: 74px;
382384
}
383385
`}</style>
384386
<style jsx={true}>{`
@@ -439,17 +441,15 @@ export default class ElectronApp extends React.Component<{}, State> {
439441
onSelectFolder={this.handleSelectFolder}
440442
onSelectEndpoint={this.handleSelectEndpoint}
441443
/>
442-
{endpoint &&
444+
{endpoint && (
443445
<div className={cx('app-content', { 'app-endpoint': !projects })}>
444-
{projects &&
446+
{projects && (
445447
<div className={cx('left-content', theme)}>
446448
<div className="list">
447-
{projects.map(project =>
449+
{projects.map(project => (
448450
<div key={project.name}>
449-
<div className={cx('list-item')}>
450-
{project.name}
451-
</div>
452-
{project.endpoints.map(ept =>
451+
<div className={cx('list-item')}>{project.name}</div>
452+
{project.endpoints.map(ept => (
453453
<div
454454
key={ept.name}
455455
className={cx('list-item list-item-project', {
@@ -459,10 +459,10 @@ export default class ElectronApp extends React.Component<{}, State> {
459459
onClick={() => this.handleChangeItem(ept)}
460460
>
461461
{ept.name}
462-
</div>,
463-
)}
464-
</div>,
465-
)}
462+
</div>
463+
))}
464+
</div>
465+
))}
466466
</div>
467467
<div className="sidenav-footer">
468468
<button
@@ -477,10 +477,11 @@ export default class ElectronApp extends React.Component<{}, State> {
477477
height={14}
478478
strokeWidth={6}
479479
/>
480-
NEW WINDOW
480+
NEW WORKSPACE
481481
</button>
482482
</div>
483-
</div>}
483+
</div>
484+
)}
484485
<div className="playground">
485486
<Playground
486487
getRef={this.setRef}
@@ -492,7 +493,8 @@ export default class ElectronApp extends React.Component<{}, State> {
492493
adminAuthToken={platformToken}
493494
/>
494495
</div>
495-
</div>}
496+
</div>
497+
)}
496498
</div>
497499
</Provider>
498500
)

packages/graphql-playground-electron/src/InitialView/InitialView.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@ class InitialView extends React.Component<
8989
// Check if there is a .graphqlconfig file in the folder
9090
if (
9191
!existsSync(resolve(path, '.graphqlconfig')) &&
92+
!existsSync(resolve(path, '.graphqlconfig.yml')) &&
9293
!existsSync(resolve(path, '.graphqlconfig.yaml'))
9394
) {
94-
alert('No .graphqlconfig (or .graphqlconfig.yaml) found in this folder')
95+
alert('No .graphqlconfig found in this folder')
9596
return
9697
}
9798
this.props.selectHistory({
@@ -256,8 +257,8 @@ class InitialView extends React.Component<
256257
<div className="initial-view-workspace">
257258
<h1 className="title">New workspace</h1>
258259
<p className="description">
259-
Either load a local repository with a .graphqlrc file, or just
260-
display a remote endpoint
260+
Either load a local repository with a .graphqlconfig file, or just
261+
open a HTTP endpoint
261262
</p>
262263
<div className="toggle">
263264
<Toggle

packages/graphql-playground-electron/yarn.lock

Lines changed: 64 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,13 @@ buffer@^4.3.0:
13891389
ieee754 "^1.1.4"
13901390
isarray "^1.0.0"
13911391

1392+
buffer@^5.0.3:
1393+
version "5.0.8"
1394+
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.0.8.tgz#84daa52e7cf2fa8ce4195bc5cf0f7809e0930b24"
1395+
dependencies:
1396+
base64-js "^1.0.2"
1397+
ieee754 "^1.1.4"
1398+
13921399
builder-util-runtime@~2.1.0:
13931400
version "2.1.0"
13941401
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-2.1.0.tgz#82362a92e202ee8315334391bbb23b2ea9099765"
@@ -1936,6 +1943,10 @@ crypto-random-string@^1.0.0:
19361943
version "1.0.0"
19371944
resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
19381945

1946+
css-color-keywords@^1.0.0:
1947+
version "1.0.0"
1948+
resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05"
1949+
19391950
19401951
version "0.0.4"
19411952
resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
@@ -1991,6 +2002,14 @@ css-selector-tokenizer@^0.7.0:
19912002
fastparse "^1.1.1"
19922003
regexpu-core "^1.0.0"
19932004

2005+
css-to-react-native@^2.0.3:
2006+
version "2.0.4"
2007+
resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.0.4.tgz#cf4cc407558b3474d4ba8be1a2cd3b6ce713101b"
2008+
dependencies:
2009+
css-color-keywords "^1.0.0"
2010+
fbjs "^0.8.5"
2011+
postcss-value-parser "^3.3.0"
2012+
19942013
19952014
version "2.1.0"
19962015
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd"
@@ -2870,7 +2889,7 @@ faye-websocket@~0.11.0:
28702889
dependencies:
28712890
websocket-driver ">=0.5.1"
28722891

2873-
fbjs@^0.8.16:
2892+
fbjs@^0.8.16, fbjs@^0.8.5:
28742893
version "0.8.16"
28752894
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
28762895
dependencies:
@@ -3311,9 +3330,9 @@ [email protected]:
33113330
graphql "^0.10.1"
33123331
graphql-language-service-types "0.0.21"
33133332

3314-
graphql-playground@^1.1.0:
3315-
version "1.1.0"
3316-
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.1.0.tgz#553063ae343bb7bff1218e5d623acf1fc1ab52b5"
3333+
graphql-playground@^1.1.6:
3334+
version "1.1.6"
3335+
resolved "https://registry.yarnpkg.com/graphql-playground/-/graphql-playground-1.1.6.tgz#0e5f07c94519310f560d05d1ad1184d83c11ceb6"
33173336
dependencies:
33183337
calculate-size "^1.1.1"
33193338
classnames "^2.2.5"
@@ -3335,7 +3354,7 @@ graphql-playground@^1.1.0:
33353354
react-dom "^16.0.0"
33363355
react-helmet "^5.2.0"
33373356
react-modal "^3.1.0"
3338-
react-redux "^5.0.5"
3357+
react-redux "^5.0.6"
33393358
react-router-dom "^4.2.2"
33403359
react-transition-group "^1.1.3"
33413360
react-virtualized "^9.12.0"
@@ -3344,6 +3363,7 @@ graphql-playground@^1.1.0:
33443363
redux-localstorage-filter "^0.1.1"
33453364
rxjs "^5.0.3"
33463365
seamless-immutable "^7.0.1"
3366+
styled-components "^2.2.3"
33473367
styled-jsx-postcss "git+https://github.com/timsuchanek/styled-jsx-postcss#build3"
33483368
subscriptions-transport-ws "^0.8.1"
33493369

@@ -3500,6 +3520,10 @@ [email protected]:
35003520
version "4.2.0"
35013521
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.0.tgz#72d9d0754f7fe25ca2d01ad8f8f9a9449a89526d"
35023522

3523+
hoist-non-react-statics@^1.2.0:
3524+
version "1.2.0"
3525+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
3526+
35033527
hoist-non-react-statics@^2.2.1:
35043528
version "2.2.2"
35053529
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.2.2.tgz#c0eca5a7d5a28c5ada3107eb763b01da6bfa81fb"
@@ -3817,6 +3841,10 @@ is-fullwidth-code-point@^2.0.0:
38173841
version "2.0.0"
38183842
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
38193843

3844+
is-function@^1.0.1:
3845+
version "1.0.1"
3846+
resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5"
3847+
38203848
is-glob@^2.0.0, is-glob@^2.0.1:
38213849
version "2.0.1"
38223850
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
@@ -5733,7 +5761,7 @@ react-proxy@^1.1.7:
57335761
lodash "^4.6.1"
57345762
react-deep-force-update "^1.0.0"
57355763

5736-
react-redux@^5.0.5:
5764+
react-redux@^5.0.5, react-redux@^5.0.6:
57375765
version "5.0.6"
57385766
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.6.tgz#23ed3a4f986359d68b5212eaaa681e60d6574946"
57395767
dependencies:
@@ -6643,6 +6671,20 @@ style-loader@^0.18.2:
66436671
loader-utils "^1.0.2"
66446672
schema-utils "^0.3.0"
66456673

6674+
styled-components@^2.2.3:
6675+
version "2.2.3"
6676+
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-2.2.3.tgz#154575c269880c840f903f580287dab155cf684c"
6677+
dependencies:
6678+
buffer "^5.0.3"
6679+
css-to-react-native "^2.0.3"
6680+
fbjs "^0.8.9"
6681+
hoist-non-react-statics "^1.2.0"
6682+
is-function "^1.0.1"
6683+
is-plain-object "^2.0.1"
6684+
prop-types "^15.5.4"
6685+
stylis "3.x"
6686+
supports-color "^3.2.3"
6687+
66466688
"styled-jsx-postcss@git+https://github.com/timsuchanek/styled-jsx-postcss#build3":
66476689
version "0.2.0"
66486690
resolved "git+https://github.com/timsuchanek/styled-jsx-postcss#677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
@@ -6654,6 +6696,18 @@ style-loader@^0.18.2:
66546696
postcss-load-plugins "^2.2.0"
66556697
styled-jsx "^0.5.7"
66566698

6699+
"styled-jsx-postcss@git+https://github.com/timsuchanek/styled-jsx-postcss.git#build3":
6700+
version "0.2.0"
6701+
uid "677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
6702+
resolved "git+https://github.com/timsuchanek/styled-jsx-postcss.git#677ee0fb7f9138047a00e03c8c3e44adbb33cf2a"
6703+
dependencies:
6704+
babel-traverse "^6.21.0"
6705+
babylon "^6.14.1"
6706+
deasync "^0.1.9"
6707+
postcss "^5.2.8"
6708+
postcss-load-plugins "^2.2.0"
6709+
styled-jsx "^0.5.7"
6710+
66576711
66586712
version "0.5.2"
66596713
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-0.5.2.tgz#59740216c3db371636f9beec02149f9da5ea02e5"
@@ -6679,6 +6733,10 @@ styled-jsx@^0.5.7:
66796733
source-map "0.5.6"
66806734
string-hash "1.1.1"
66816735

6736+
6737+
version "3.4.3"
6738+
resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.4.3.tgz#875bd0db3db37bb6de08f89275fc38ee2e32ee75"
6739+
66826740
subscriptions-transport-ws@^0.8.1:
66836741
version "0.8.2"
66846742
resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.8.2.tgz#2325b3cff1bdcd824b60a8ba7135cdfeb6161091"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-playground-middleware-express",
3-
"version": "1.1.4",
3+
"version": "1.1.7-beta.3",
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": [
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
jobs:
2+
3+
playground-build:
4+
docker:
5+
- image: circleci/node:8
6+
steps:
7+
- checkout
8+
- run: cd packages/graphql-playground && yarn
9+
- run: cd packages/graphql-playground && yarn build
10+
11+
electron-build:
12+
docker:
13+
- image: circleci/node:8
14+
steps:
15+
- checkout
16+
- run: cd packages/graphql-playground-electron && yarn
17+
- run: cd packages/graphql-playground-electron && yarn release
18+
19+
workflows:
20+
version: 2
21+
build:
22+
jobs:
23+
- playground-build
24+
- electron-build

0 commit comments

Comments
 (0)